From 0e7e93dc8691e10cb3cdadee854e4e74253563af Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Thu, 7 Oct 2021 10:50:58 -0700 Subject: [PATCH 001/203] chore: update repo-metadata.json client_documentation link (#97) --- .repo-metadata.json | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 120a761a..0e41ddf7 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -3,7 +3,7 @@ "name_pretty": "Binary Authorization", "product_documentation": "https://cloud.google.com/binary-authorization/docs", "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", - "client_documentation": "https://googleapis.dev/java/google-cloud-binary-authorization/latest/index.html", + "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-binary-authorization/latest/history", "release_level": "beta", "transport": "grpc", "language": "java", diff --git a/README.md b/README.md index dd3a8c10..9d45b6ba 100644 --- a/README.md +++ b/README.md @@ -165,7 +165,7 @@ Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] Java is a registered trademark of Oracle and/or its affiliates. [product-docs]: https://cloud.google.com/binary-authorization/docs -[javadocs]: https://googleapis.dev/java/google-cloud-binary-authorization/latest/index.html +[javadocs]: https://cloud.google.com/java/docs/reference/google-cloud-binary-authorization/latest/history [kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java7.svg [kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java7.html [kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java8.svg From 96b4ade05a5199206330e89943b839f569384130 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 13 Oct 2021 17:32:25 +0200 Subject: [PATCH 002/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.1.0 (#98) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.0.3` -> `1.1.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/compatibility-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.1.0/confidence-slim/1.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.1.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​110-httpswwwgithubcomgoogleapisjava-shared-configcomparev103v110-2021-10-12) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.0.3...v1.1.0) ##### Features - introduce Maven configuration for GraalVM testing ([#​314](https://www.togithub.com/googleapis/java-shared-config/issues/314)) ([28fbeb8](https://www.github.com/googleapis/java-shared-config/commit/28fbeb86c4466a58a05d6933584564dbf3352e79)) ##### Bug Fixes - update doclet version ([#​332](https://www.togithub.com/googleapis/java-shared-config/issues/332)) ([3fd0350](https://www.github.com/googleapis/java-shared-config/commit/3fd035030e4f0954dd1f62f7b8ea62583685880c)) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9.0.1 ([#​327](https://www.togithub.com/googleapis/java-shared-config/issues/327)) ([b6c9b65](https://www.github.com/googleapis/java-shared-config/commit/b6c9b657550db2dee6b36edbb9a6084baee125e2)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.6 ([#​330](https://www.togithub.com/googleapis/java-shared-config/issues/330)) ([271ed7d](https://www.github.com/googleapis/java-shared-config/commit/271ed7dba35623e22fc8a7f7d477e6043e772014)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.6 ([#​331](https://www.togithub.com/googleapis/java-shared-config/issues/331)) ([4f9ba15](https://www.github.com/googleapis/java-shared-config/commit/4f9ba1551df0a2d4fc8c9acca8a951afbe8cb78a)) - update dependency org.junit.vintage:junit-vintage-engine to v5.8.1 ([#​329](https://www.togithub.com/googleapis/java-shared-config/issues/329)) ([4a8789e](https://www.github.com/googleapis/java-shared-config/commit/4a8789ee814ba8a3480beecc76c16fd1cb4e5f12)) ##### [1.0.3](https://www.github.com/googleapis/java-shared-config/compare/v1.0.2...v1.0.3) (2021-09-21) ##### Bug Fixes - update java-docfx-doclet version ([#​315](https://www.togithub.com/googleapis/java-shared-config/issues/315)) ([07af07c](https://www.github.com/googleapis/java-shared-config/commit/07af07c188447ea5728ecd2700121ff477d1c58a)) ##### [1.0.2](https://www.github.com/googleapis/java-shared-config/compare/v1.0.1...v1.0.2) (2021-09-13) ##### Bug Fixes - specify animal-sniffer-maven-plugin version ([#​308](https://www.togithub.com/googleapis/java-shared-config/issues/308)) ([378bf43](https://www.github.com/googleapis/java-shared-config/commit/378bf431383306c1cdd0a4f922956c87edf321b5)) - update java docfx doclet version ([#​312](https://www.togithub.com/googleapis/java-shared-config/issues/312)) ([dd7f6e0](https://www.github.com/googleapis/java-shared-config/commit/dd7f6e0c1a7cc73831b74b4475457611a8c097d3)) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9 ([#​303](https://www.togithub.com/googleapis/java-shared-config/issues/303)) ([71faea3](https://www.github.com/googleapis/java-shared-config/commit/71faea38d4132407598550e2bb4c77f9d4a4d83d)) ##### [1.0.1](https://www.github.com/googleapis/java-shared-config/compare/v1.0.0...v1.0.1) (2021-08-18) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v8.45.1 ([#​292](https://www.togithub.com/googleapis/java-shared-config/issues/292)) ([66bf6e6](https://www.github.com/googleapis/java-shared-config/commit/66bf6e6fb95997b9eb4b34268b8d20c2fbe9ed5a))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index dcec3b04..a2af5f4b 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.0.3 + 1.1.0 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 9cbcf990..d1678c13 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.0.3 + 1.1.0 From 8b63a9545370fb25454c948986131b3553552197 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 18 Oct 2021 17:32:32 +0000 Subject: [PATCH 003/203] build(java): Introduce Native Image testing build script changes (#100) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 5 +++++ .kokoro/presubmit/graalvm-native.cfg | 33 ++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .kokoro/presubmit/graalvm-native.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5ff6c87c..dc53bbb5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:13b7387edb404234610d30473ac48210ae7fe42a136335ee2b2f8a07c4c7f6a5 + digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 01b016df..3a539b64 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -69,6 +69,11 @@ integration) verify RETURN_CODE=$? ;; +graalvm) + # Run Unit and Integration Tests with Native Image + mvn test -Pnative -Penable-integration-tests + RETURN_CODE=$? + ;; samples) SAMPLES_DIR=samples # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg new file mode 100644 index 00000000..4c7225ec --- /dev/null +++ b/.kokoro/presubmit/graalvm-native.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" +} + +env_vars: { + key: "JOB_TYPE" + value: "graalvm" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} From 3f592b5bd92410c7afa40e166ea26012cad26648 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Oct 2021 17:34:33 +0200 Subject: [PATCH 004/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.3.0` -> `2.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.4.0/compatibility-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.4.0/confidence-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.4.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​240-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare230v240-2021-10-18) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.3.0...v2.4.0) ##### Dependencies - update dependency com.fasterxml.jackson:jackson-bom to v2.13.0 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.api-client:google-api-client-bom to v1.32.2 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.api:api-common to v2.0.5 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.auth:google-auth-library-bom to v1.2.1 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.guava:guava-bom to v31 ([#​498](https://www.togithub.com/googleapis/java-shared-dependencies/issues/498)) ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.http-client:google-http-client-bom to v1.40.1 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update dependency com.google.protobuf:protobuf-bom to v3.18.1 ([#​494](https://www.togithub.com/googleapis/java-shared-dependencies/issues/494)) ([a30e376](https://www.github.com/googleapis/java-shared-dependencies/commit/a30e3762b5fb0e2d31304d211c12eb2c1320f0c1)) - update dependency io.grpc:grpc-bom to v1.41.0 ([#​482](https://www.togithub.com/googleapis/java-shared-dependencies/issues/482)) ([8a7d227](https://www.github.com/googleapis/java-shared-dependencies/commit/8a7d227f2a1dab9ff23d247a4e6131c817804c36)) - update gax.version to v2.6.1 ([dba11b5](https://www.github.com/googleapis/java-shared-dependencies/commit/dba11b5fe14d39cdd62357e7bb1b82831c481150)) - update iam.version to v1.1.6 ([#​485](https://www.togithub.com/googleapis/java-shared-dependencies/issues/485)) ([cef7e09](https://www.github.com/googleapis/java-shared-dependencies/commit/cef7e090bbc2e3ae775fa83505f98df286ba7d42))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d1678c13..fbf8f383 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.3.0 + 2.4.0 pom import From 21758d1fd5cbaabb85f2566f0efb952fa53ea054 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:42:24 +0000 Subject: [PATCH 005/203] chore: release 0.3.3 (#102) :robot: I have created a release \*beep\* \*boop\* --- ### [0.3.3](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.2...v0.3.3) (2021-10-19) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#101](https://www.github.com/googleapis/java-binary-authorization/issues/101)) ([3f592b5](https://www.github.com/googleapis/java-binary-authorization/commit/3f592b5bd92410c7afa40e166ea26012cad26648)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 8 ++++---- google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1beta1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-binary-authorization-v1beta1/pom.xml | 4 ++-- versions.txt | 6 +++--- 7 files changed, 24 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e1e93252..d0f6dbbb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.3.3](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.2...v0.3.3) (2021-10-19) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#101](https://www.github.com/googleapis/java-binary-authorization/issues/101)) ([3f592b5](https://www.github.com/googleapis/java-binary-authorization/commit/3f592b5bd92410c7afa40e166ea26012cad26648)) + ### [0.3.2](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.1...v0.3.2) (2021-09-22) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index a2af5f4b..088ca965 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.3.3-SNAPSHOT + 0.3.3 pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3-SNAPSHOT + 0.3.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index a32c1737..f0bcb0e1 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.3.3-SNAPSHOT + 0.3.3 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.3.3-SNAPSHOT + 0.3.3 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 2b39d0fb..1eb362a0 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.3-SNAPSHOT + 0.3.3 diff --git a/pom.xml b/pom.xml index fbf8f383..6e8120ab 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.3.3-SNAPSHOT + 0.3.3 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,17 +60,17 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3-SNAPSHOT + 0.3.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index ebb64c35..d7a4d271 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3-SNAPSHOT + 0.3.3 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.3-SNAPSHOT + 0.3.3 diff --git a/versions.txt b/versions.txt index 21401060..e4154048 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.3.2:0.3.3-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.3.2:0.3.3-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.3.2:0.3.3-SNAPSHOT +google-cloud-binary-authorization:0.3.3:0.3.3 +grpc-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.3 +proto-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.3 From 34e5a33cd263481f61761198e216e4b0cba3b537 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 19 Oct 2021 15:50:21 +0000 Subject: [PATCH 006/203] chore: release 0.3.4-SNAPSHOT (#103) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 8 ++++---- google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1beta1/pom.xml | 4 ++-- pom.xml | 8 ++++---- proto-google-cloud-binary-authorization-v1beta1/pom.xml | 4 ++-- versions.txt | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 088ca965..279399fd 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.3.3 + 0.3.4-SNAPSHOT pom com.google.cloud @@ -56,17 +56,17 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.3.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index f0bcb0e1..06fa9486 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.3.4-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.3.3 + 0.3.4-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 1eb362a0..bfb3d1d0 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.3 + 0.3.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index 6e8120ab..77b1f900 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.3.3 + 0.3.4-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,17 +60,17 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.3.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index d7a4d271..79332fe2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.3 + 0.3.4-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.3 + 0.3.4-SNAPSHOT diff --git a/versions.txt b/versions.txt index e4154048..487ce4eb 100644 --- a/versions.txt +++ b/versions.txt @@ -1,6 +1,6 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.3.3:0.3.3 -grpc-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.3 -proto-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.3 +google-cloud-binary-authorization:0.3.3:0.3.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT From f5315fcb4761ac78e0b66945a8ee3b6d6f5e85eb Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 21:48:27 +0000 Subject: [PATCH 007/203] feat: binaryauthorization v1 public protos (#90) - [x] Regenerate this pull request now. Committer: @alexander-fenster PiperOrigin-RevId: 398308923 Source-Link: https://github.com/googleapis/googleapis/commit/a3dccab3d2646799e6f3554994662c7aefa0d271 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d475ce18d50c90ecdc27e425fdd498b26912266d Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDQ3NWNlMThkNTBjOTBlY2RjMjdlNDI1ZmRkNDk4YjI2OTEyMjY2ZCJ9 --- README.md | 6 +- google-cloud-binary-authorization-bom/pom.xml | 10 + google-cloud-binary-authorization/pom.xml | 14 + .../v1/BinauthzManagementServiceV1Client.java | 1062 ++ .../BinauthzManagementServiceV1Settings.java | 261 + .../v1/SystemPolicyV1Client.java | 265 + .../v1/SystemPolicyV1Settings.java | 184 + .../v1/ValidationHelperV1Client.java | 237 + .../v1/ValidationHelperV1Settings.java | 190 + .../v1/gapic_metadata.json | 63 + .../binaryauthorization/v1/package-info.java | 80 + .../stub/BinauthzManagementServiceV1Stub.java | 73 + ...nauthzManagementServiceV1StubSettings.java | 524 + ...thzManagementServiceV1CallableFactory.java | 113 + .../GrpcBinauthzManagementServiceV1Stub.java | 369 + .../GrpcSystemPolicyV1CallableFactory.java | 113 + .../v1/stub/GrpcSystemPolicyV1Stub.java | 165 + ...GrpcValidationHelperV1CallableFactory.java | 113 + .../v1/stub/GrpcValidationHelperV1Stub.java | 184 + .../v1/stub/SystemPolicyV1Stub.java | 40 + .../v1/stub/SystemPolicyV1StubSettings.java | 267 + .../v1/stub/ValidationHelperV1Stub.java | 43 + .../stub/ValidationHelperV1StubSettings.java | 278 + ...BinauthzManagementServiceV1ClientTest.java | 605 + .../v1/MockBinauthzManagementServiceV1.java | 59 + .../MockBinauthzManagementServiceV1Impl.java | 209 + .../v1/MockSystemPolicyV1.java | 59 + .../v1/MockSystemPolicyV1Impl.java | 81 + .../v1/MockValidationHelperV1.java | 59 + .../v1/MockValidationHelperV1Impl.java | 82 + .../v1/SystemPolicyV1ClientTest.java | 178 + .../v1/ValidationHelperV1ClientTest.java | 134 + .../pom.xml | 65 + .../v1/BinauthzManagementServiceV1Grpc.java | 1245 ++ .../v1/SystemPolicyV1Grpc.java | 375 + .../v1/ValidationHelperV1Grpc.java | 410 + pom.xml | 18 + .../clirr-ignored-differences.xml | 5 + .../pom.xml | 46 + .../binaryauthorization/v1/AttestorName.java | 192 + .../binaryauthorization/v1/PolicyName.java | 254 + .../binaryauthorization/v1/ProjectName.java | 168 + .../binaryauthorization/v1/Resources.java | 14548 ++++++++++++++++ .../cloud/binaryauthorization/v1/Service.java | 11272 ++++++++++++ .../binaryauthorization/v1/resources.proto | 334 + .../binaryauthorization/v1/service.proto | 312 + versions.txt | 2 + 47 files changed, 35363 insertions(+), 3 deletions(-) create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java create mode 100644 grpc-google-cloud-binary-authorization-v1/pom.xml create mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java create mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java create mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java create mode 100644 proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml create mode 100644 proto-google-cloud-binary-authorization-v1/pom.xml create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto create mode 100644 proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto diff --git a/README.md b/README.md index 9d45b6ba..32ca69f6 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 0.3.1 + 0.3.3 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:0.3.1' +implementation 'com.google.cloud:google-cloud-binary-authorization:0.3.3' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.3.1" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.3.3" ``` ## Authentication diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 279399fd..b196ce0e 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -63,11 +63,21 @@ grpc-google-cloud-binary-authorization-v1beta1 0.3.4-SNAPSHOT + + com.google.api.grpc + grpc-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 0.3.4-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 06fa9486..215f8e97 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -42,6 +42,10 @@ proto-google-common-protos + + com.google.api.grpc + proto-google-cloud-binary-authorization-v1 + com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 @@ -63,6 +67,11 @@ threetenbp + + io.grafeas + grafeas + + junit @@ -76,6 +85,11 @@ grpc-google-cloud-binary-authorization-v1beta1 test + + com.google.api.grpc + grpc-google-cloud-binary-authorization-v1 + test + com.google.api diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java new file mode 100644 index 00000000..bbd24b07 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -0,0 +1,1062 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +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.common.util.concurrent.MoreExecutors; +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1Stub; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: Google Cloud Management Service for Binary Authorization admission policies + * and attestation authorities. + * + *

This API implements a REST model with the following objects: + * + *

    + *
  • [Policy][google.cloud.binaryauthorization.v1.Policy] + *
  • [Attestor][google.cloud.binaryauthorization.v1.Attestor] + *
+ * + *

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 (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ *     BinauthzManagementServiceV1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ *     BinauthzManagementServiceV1Settings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ *     BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class BinauthzManagementServiceV1Client implements BackgroundResource { + private final BinauthzManagementServiceV1Settings settings; + private final BinauthzManagementServiceV1Stub stub; + + /** Constructs an instance of BinauthzManagementServiceV1Client with default settings. */ + public static final BinauthzManagementServiceV1Client create() throws IOException { + return create(BinauthzManagementServiceV1Settings.newBuilder().build()); + } + + /** + * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client create( + BinauthzManagementServiceV1Settings settings) throws IOException { + return new BinauthzManagementServiceV1Client(settings); + } + + /** + * Constructs an instance of BinauthzManagementServiceV1Client, using the given stub for making + * calls. This is for advanced usage - prefer using create(BinauthzManagementServiceV1Settings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final BinauthzManagementServiceV1Client create( + BinauthzManagementServiceV1Stub stub) { + return new BinauthzManagementServiceV1Client(stub); + } + + /** + * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Settings settings) + throws IOException { + this.settings = settings; + this.stub = ((BinauthzManagementServiceV1StubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Stub stub) { + this.settings = null; + this.stub = stub; + } + + public final BinauthzManagementServiceV1Settings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public BinauthzManagementServiceV1Stub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the + * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container + * image, before the project is allowed to deploy that image. There is at most one policy per + * project. All image admission requests are permitted if a project has no policy. + * + *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a + * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format + * `projects/*/policy`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Policy getPolicy(PolicyName name) { + Service.GetPolicyRequest request = + Service.GetPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the + * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container + * image, before the project is allowed to deploy that image. There is at most one policy per + * project. All image admission requests are permitted if a project has no policy. + * + *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a + * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
+   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the + * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format + * `projects/*/policy`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Policy getPolicy(String name) { + Service.GetPolicyRequest request = Service.GetPolicyRequest.newBuilder().setName(name).build(); + return getPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the + * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container + * image, before the project is allowed to deploy that image. There is at most one policy per + * project. All image admission requests are permitted if a project has no policy. + * + *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a + * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.GetPolicyRequest request =
+   *       Service.GetPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(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 Resources.Policy getPolicy(Service.GetPolicyRequest request) { + return getPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the + * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container + * image, before the project is allowed to deploy that image. There is at most one policy per + * project. All image admission requests are permitted if a project has no policy. + * + *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a + * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.GetPolicyRequest request =
+   *       Service.GetPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.getPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getPolicyCallable() { + return stub.getPolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and + * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is + * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or + * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the + * request is malformed. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Resources.Policy policy = Resources.Policy.newBuilder().build();
+   *   Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(policy);
+   * }
+   * }
+ * + * @param policy Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] + * value. The service will overwrite the [policy + * name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the + * request URL, in the format `projects/*/policy`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Policy updatePolicy(Resources.Policy policy) { + Service.UpdatePolicyRequest request = + Service.UpdatePolicyRequest.newBuilder().setPolicy(policy).build(); + return updatePolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and + * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is + * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or + * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the + * request is malformed. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.UpdatePolicyRequest request =
+   *       Service.UpdatePolicyRequest.newBuilder()
+   *           .setPolicy(Resources.Policy.newBuilder().build())
+   *           .build();
+   *   Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(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 Resources.Policy updatePolicy(Service.UpdatePolicyRequest request) { + return updatePolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and + * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is + * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or + * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the + * request is malformed. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.UpdatePolicyRequest request =
+   *       Service.UpdatePolicyRequest.newBuilder()
+   *           .setPolicy(Resources.Policy.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.updatePolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable updatePolicyCallable() { + return stub.updatePolicyCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the + * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project + * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   String attestorId = "attestorId2055733027";
+   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+   *   Resources.Attestor response =
+   *       binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
+   * }
+   * }
+ * + * @param parent Required. The parent of this + * [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] + * value. The service will overwrite the [attestor + * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in + * the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Attestor createAttestor( + ProjectName parent, String attestorId, Resources.Attestor attestor) { + Service.CreateAttestorRequest request = + Service.CreateAttestorRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setAttestorId(attestorId) + .setAttestor(attestor) + .build(); + return createAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the + * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project + * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   String attestorId = "attestorId2055733027";
+   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+   *   Resources.Attestor response =
+   *       binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
+   * }
+   * }
+ * + * @param parent Required. The parent of this + * [attestor][google.cloud.binaryauthorization.v1.Attestor]. + * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] + * value. The service will overwrite the [attestor + * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in + * the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Attestor createAttestor( + String parent, String attestorId, Resources.Attestor attestor) { + Service.CreateAttestorRequest request = + Service.CreateAttestorRequest.newBuilder() + .setParent(parent) + .setAttestorId(attestorId) + .setAttestor(attestor) + .build(); + return createAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the + * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project + * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.CreateAttestorRequest request =
+   *       Service.CreateAttestorRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setAttestorId("attestorId2055733027")
+   *           .setAttestor(Resources.Attestor.newBuilder().build())
+   *           .build();
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.createAttestor(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 Resources.Attestor createAttestor(Service.CreateAttestorRequest request) { + return createAttestorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the + * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project + * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.CreateAttestorRequest request =
+   *       Service.CreateAttestorRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setAttestorId("attestorId2055733027")
+   *           .setAttestor(Resources.Attestor.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.createAttestorCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Attestor response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createAttestorCallable() { + return stub.createAttestorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] + * to retrieve, in the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Attestor getAttestor(AttestorName name) { + Service.GetAttestorRequest request = + Service.GetAttestorRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] + * to retrieve, in the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Attestor getAttestor(String name) { + Service.GetAttestorRequest request = + Service.GetAttestorRequest.newBuilder().setName(name).build(); + return getAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.GetAttestorRequest request =
+   *       Service.GetAttestorRequest.newBuilder()
+   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+   *           .build();
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(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 Resources.Attestor getAttestor(Service.GetAttestorRequest request) { + return getAttestorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.GetAttestorRequest request =
+   *       Service.GetAttestorRequest.newBuilder()
+   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.getAttestorCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Attestor response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getAttestorCallable() { + return stub.getAttestorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(attestor);
+   * }
+   * }
+ * + * @param attestor Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] + * value. The service will overwrite the [attestor + * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in + * the request URL, in the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Attestor updateAttestor(Resources.Attestor attestor) { + Service.UpdateAttestorRequest request = + Service.UpdateAttestorRequest.newBuilder().setAttestor(attestor).build(); + return updateAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.UpdateAttestorRequest request =
+   *       Service.UpdateAttestorRequest.newBuilder()
+   *           .setAttestor(Resources.Attestor.newBuilder().build())
+   *           .build();
+   *   Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(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 Resources.Attestor updateAttestor(Service.UpdateAttestorRequest request) { + return updateAttestorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.UpdateAttestorRequest request =
+   *       Service.UpdateAttestorRequest.newBuilder()
+   *           .setAttestor(Resources.Attestor.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.updateAttestorCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Attestor response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + updateAttestorCallable() { + return stub.updateAttestorCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if + * the project does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   ProjectName parent = ProjectName.of("[PROJECT]");
+   *   for (Resources.Attestor element :
+   *       binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAttestorsPagedResponse listAttestors(ProjectName parent) { + Service.ListAttestorsRequest request = + Service.ListAttestorsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listAttestors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if + * the project does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   String parent = ProjectName.of("[PROJECT]").toString();
+   *   for (Resources.Attestor element :
+   *       binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The resource name of the project associated with the + * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListAttestorsPagedResponse listAttestors(String parent) { + Service.ListAttestorsRequest request = + Service.ListAttestorsRequest.newBuilder().setParent(parent).build(); + return listAttestors(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if + * the project does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.ListAttestorsRequest request =
+   *       Service.ListAttestorsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Resources.Attestor element :
+   *       binauthzManagementServiceV1Client.listAttestors(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 ListAttestorsPagedResponse listAttestors(Service.ListAttestorsRequest request) { + return listAttestorsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if + * the project does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.ListAttestorsRequest request =
+   *       Service.ListAttestorsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.listAttestorsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Resources.Attestor element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAttestorsPagedCallable() { + return stub.listAttestorsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if + * the project does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.ListAttestorsRequest request =
+   *       Service.ListAttestorsRequest.newBuilder()
+   *           .setParent(ProjectName.of("[PROJECT]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     Service.ListAttestorsResponse response =
+   *         binauthzManagementServiceV1Client.listAttestorsCallable().call(request);
+   *     for (Resources.Attestor element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listAttestorsCallable() { + return stub.listAttestorsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
+   *   binauthzManagementServiceV1Client.deleteAttestor(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] + * to delete, in the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAttestor(AttestorName name) { + Service.DeleteAttestorRequest request = + Service.DeleteAttestorRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
+   *   binauthzManagementServiceV1Client.deleteAttestor(name);
+   * }
+   * }
+ * + * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] + * to delete, in the format `projects/*/attestors/*`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteAttestor(String name) { + Service.DeleteAttestorRequest request = + Service.DeleteAttestorRequest.newBuilder().setName(name).build(); + deleteAttestor(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.DeleteAttestorRequest request =
+   *       Service.DeleteAttestorRequest.newBuilder()
+   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+   *           .build();
+   *   binauthzManagementServiceV1Client.deleteAttestor(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 deleteAttestor(Service.DeleteAttestorRequest request) { + deleteAttestorCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + * + *

Sample code: + * + *

{@code
+   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+   *     BinauthzManagementServiceV1Client.create()) {
+   *   Service.DeleteAttestorRequest request =
+   *       Service.DeleteAttestorRequest.newBuilder()
+   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       binauthzManagementServiceV1Client.deleteAttestorCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteAttestorCallable() { + return stub.deleteAttestorCallable(); + } + + @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 ListAttestorsPagedResponse + extends AbstractPagedListResponse< + Service.ListAttestorsRequest, + Service.ListAttestorsResponse, + Resources.Attestor, + ListAttestorsPage, + ListAttestorsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListAttestorsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + input -> new ListAttestorsPagedResponse(input), + MoreExecutors.directExecutor()); + } + + private ListAttestorsPagedResponse(ListAttestorsPage page) { + super(page, ListAttestorsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListAttestorsPage + extends AbstractPage< + Service.ListAttestorsRequest, + Service.ListAttestorsResponse, + Resources.Attestor, + ListAttestorsPage> { + + private ListAttestorsPage( + PageContext + context, + Service.ListAttestorsResponse response) { + super(context, response); + } + + private static ListAttestorsPage createEmptyPage() { + return new ListAttestorsPage(null, null); + } + + @Override + protected ListAttestorsPage createPage( + PageContext + context, + Service.ListAttestorsResponse response) { + return new ListAttestorsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListAttestorsFixedSizeCollection + extends AbstractFixedSizeCollection< + Service.ListAttestorsRequest, + Service.ListAttestorsResponse, + Resources.Attestor, + ListAttestorsPage, + ListAttestorsFixedSizeCollection> { + + private ListAttestorsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListAttestorsFixedSizeCollection createEmptyCollection() { + return new ListAttestorsFixedSizeCollection(null, 0); + } + + @Override + protected ListAttestorsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListAttestorsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java new file mode 100644 index 00000000..e7a23f93 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java @@ -0,0 +1,261 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +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.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; +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 BinauthzManagementServiceV1Client}. + * + *

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

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

{@code
+ * BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
+ *     BinauthzManagementServiceV1Settings.newBuilder();
+ * binauthzManagementServiceV1SettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         binauthzManagementServiceV1SettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ *     binauthzManagementServiceV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class BinauthzManagementServiceV1Settings + extends ClientSettings { + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getPolicySettings(); + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updatePolicySettings(); + } + + /** Returns the object with the settings used for calls to createAttestor. */ + public UnaryCallSettings + createAttestorSettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).createAttestorSettings(); + } + + /** Returns the object with the settings used for calls to getAttestor. */ + public UnaryCallSettings getAttestorSettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getAttestorSettings(); + } + + /** Returns the object with the settings used for calls to updateAttestor. */ + public UnaryCallSettings + updateAttestorSettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updateAttestorSettings(); + } + + /** Returns the object with the settings used for calls to listAttestors. */ + public PagedCallSettings< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).listAttestorsSettings(); + } + + /** Returns the object with the settings used for calls to deleteAttestor. */ + public UnaryCallSettings deleteAttestorSettings() { + return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).deleteAttestorSettings(); + } + + public static final BinauthzManagementServiceV1Settings create( + BinauthzManagementServiceV1StubSettings stub) throws IOException { + return new BinauthzManagementServiceV1Settings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return BinauthzManagementServiceV1StubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return BinauthzManagementServiceV1StubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return BinauthzManagementServiceV1StubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.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 BinauthzManagementServiceV1Settings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for BinauthzManagementServiceV1Settings. */ + public static class Builder + extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(BinauthzManagementServiceV1StubSettings.newBuilder(clientContext)); + } + + protected Builder(BinauthzManagementServiceV1Settings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(BinauthzManagementServiceV1StubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(BinauthzManagementServiceV1StubSettings.newBuilder()); + } + + public BinauthzManagementServiceV1StubSettings.Builder getStubSettingsBuilder() { + return ((BinauthzManagementServiceV1StubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder + getPolicySettings() { + return getStubSettingsBuilder().getPolicySettings(); + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder + updatePolicySettings() { + return getStubSettingsBuilder().updatePolicySettings(); + } + + /** Returns the builder for the settings used for calls to createAttestor. */ + public UnaryCallSettings.Builder + createAttestorSettings() { + return getStubSettingsBuilder().createAttestorSettings(); + } + + /** Returns the builder for the settings used for calls to getAttestor. */ + public UnaryCallSettings.Builder + getAttestorSettings() { + return getStubSettingsBuilder().getAttestorSettings(); + } + + /** Returns the builder for the settings used for calls to updateAttestor. */ + public UnaryCallSettings.Builder + updateAttestorSettings() { + return getStubSettingsBuilder().updateAttestorSettings(); + } + + /** Returns the builder for the settings used for calls to listAttestors. */ + public PagedCallSettings.Builder< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings() { + return getStubSettingsBuilder().listAttestorsSettings(); + } + + /** Returns the builder for the settings used for calls to deleteAttestor. */ + public UnaryCallSettings.Builder + deleteAttestorSettings() { + return getStubSettingsBuilder().deleteAttestorSettings(); + } + + @Override + public BinauthzManagementServiceV1Settings build() throws IOException { + return new BinauthzManagementServiceV1Settings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java new file mode 100644 index 00000000..a4fe0c1f --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -0,0 +1,265 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1Stub; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: API for working with the system policy. + * + *

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 (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * SystemPolicyV1Settings systemPolicyV1Settings =
+ *     SystemPolicyV1Settings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * SystemPolicyV1Settings systemPolicyV1Settings =
+ *     SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class SystemPolicyV1Client implements BackgroundResource { + private final SystemPolicyV1Settings settings; + private final SystemPolicyV1Stub stub; + + /** Constructs an instance of SystemPolicyV1Client with default settings. */ + public static final SystemPolicyV1Client create() throws IOException { + return create(SystemPolicyV1Settings.newBuilder().build()); + } + + /** + * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client create(SystemPolicyV1Settings settings) + throws IOException { + return new SystemPolicyV1Client(settings); + } + + /** + * Constructs an instance of SystemPolicyV1Client, using the given stub for making calls. This is + * for advanced usage - prefer using create(SystemPolicyV1Settings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final SystemPolicyV1Client create(SystemPolicyV1Stub stub) { + return new SystemPolicyV1Client(stub); + } + + /** + * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client(SystemPolicyV1Settings settings) throws IOException { + this.settings = settings; + this.stub = ((SystemPolicyV1StubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected SystemPolicyV1Client(SystemPolicyV1Stub stub) { + this.settings = null; + this.stub = stub; + } + + public final SystemPolicyV1Settings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SystemPolicyV1Stub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name, in the format `locations/*/policy`. Note that the + * system policy is not associated with a project. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Policy getSystemPolicy(PolicyName name) { + Service.GetSystemPolicyRequest request = + Service.GetSystemPolicyRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getSystemPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
+   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name, in the format `locations/*/policy`. Note that the + * system policy is not associated with a project. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Resources.Policy getSystemPolicy(String name) { + Service.GetSystemPolicyRequest request = + Service.GetSystemPolicyRequest.newBuilder().setName(name).build(); + return getSystemPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+   *   Service.GetSystemPolicyRequest request =
+   *       Service.GetSystemPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(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 Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest request) { + return getSystemPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+   *   Service.GetSystemPolicyRequest request =
+   *       Service.GetSystemPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       systemPolicyV1Client.getSystemPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Resources.Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + getSystemPolicyCallable() { + return stub.getSystemPolicyCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java new file mode 100644 index 00000000..1cfd8c98 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java @@ -0,0 +1,184 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; +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 SystemPolicyV1Client}. + * + *

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

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

{@code
+ * SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
+ *     SystemPolicyV1Settings.newBuilder();
+ * systemPolicyV1SettingsBuilder
+ *     .getSystemPolicySettings()
+ *     .setRetrySettings(
+ *         systemPolicyV1SettingsBuilder
+ *             .getSystemPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SystemPolicyV1Settings extends ClientSettings { + + /** Returns the object with the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings + getSystemPolicySettings() { + return ((SystemPolicyV1StubSettings) getStubSettings()).getSystemPolicySettings(); + } + + public static final SystemPolicyV1Settings create(SystemPolicyV1StubSettings stub) + throws IOException { + return new SystemPolicyV1Settings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SystemPolicyV1StubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SystemPolicyV1StubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SystemPolicyV1StubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SystemPolicyV1StubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SystemPolicyV1StubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SystemPolicyV1StubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SystemPolicyV1StubSettings.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 SystemPolicyV1Settings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SystemPolicyV1Settings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SystemPolicyV1StubSettings.newBuilder(clientContext)); + } + + protected Builder(SystemPolicyV1Settings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SystemPolicyV1StubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SystemPolicyV1StubSettings.newBuilder()); + } + + public SystemPolicyV1StubSettings.Builder getStubSettingsBuilder() { + return ((SystemPolicyV1StubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings.Builder + getSystemPolicySettings() { + return getStubSettingsBuilder().getSystemPolicySettings(); + } + + @Override + public SystemPolicyV1Settings build() throws IOException { + return new SystemPolicyV1Settings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java new file mode 100644 index 00000000..af4f0634 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java @@ -0,0 +1,237 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1Stub; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: BinAuthz Attestor verification + * + *

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 (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ *   Service.ValidateAttestationOccurrenceRequest request =
+ *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ *           .setAttestor("attestor542920680")
+ *           .setAttestation(AttestationOccurrence.newBuilder().build())
+ *           .setOccurrenceNote("occurrenceNote1722072419")
+ *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ *           .build();
+ *   Service.ValidateAttestationOccurrenceResponse response =
+ *       validationHelperV1Client.validateAttestationOccurrence(request);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ *     ValidationHelperV1Settings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ValidationHelperV1Client validationHelperV1Client =
+ *     ValidationHelperV1Client.create(validationHelperV1Settings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ *     ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * ValidationHelperV1Client validationHelperV1Client =
+ *     ValidationHelperV1Client.create(validationHelperV1Settings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class ValidationHelperV1Client implements BackgroundResource { + private final ValidationHelperV1Settings settings; + private final ValidationHelperV1Stub stub; + + /** Constructs an instance of ValidationHelperV1Client with default settings. */ + public static final ValidationHelperV1Client create() throws IOException { + return create(ValidationHelperV1Settings.newBuilder().build()); + } + + /** + * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client create(ValidationHelperV1Settings settings) + throws IOException { + return new ValidationHelperV1Client(settings); + } + + /** + * Constructs an instance of ValidationHelperV1Client, using the given stub for making calls. This + * is for advanced usage - prefer using create(ValidationHelperV1Settings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final ValidationHelperV1Client create(ValidationHelperV1Stub stub) { + return new ValidationHelperV1Client(stub); + } + + /** + * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client(ValidationHelperV1Settings settings) throws IOException { + this.settings = settings; + this.stub = ((ValidationHelperV1StubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected ValidationHelperV1Client(ValidationHelperV1Stub stub) { + this.settings = null; + this.stub = stub; + } + + public final ValidationHelperV1Settings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ValidationHelperV1Stub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns whether the given Attestation for the given image URI was signed by the given Attestor + * + *

Sample code: + * + *

{@code
+   * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+   *   Service.ValidateAttestationOccurrenceRequest request =
+   *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
+   *           .setAttestor("attestor542920680")
+   *           .setAttestation(AttestationOccurrence.newBuilder().build())
+   *           .setOccurrenceNote("occurrenceNote1722072419")
+   *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+   *           .build();
+   *   Service.ValidateAttestationOccurrenceResponse response =
+   *       validationHelperV1Client.validateAttestationOccurrence(request);
+   * }
+   * }
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service.ValidateAttestationOccurrenceResponse validateAttestationOccurrence( + Service.ValidateAttestationOccurrenceRequest request) { + return validateAttestationOccurrenceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns whether the given Attestation for the given image URI was signed by the given Attestor + * + *

Sample code: + * + *

{@code
+   * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+   *   Service.ValidateAttestationOccurrenceRequest request =
+   *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
+   *           .setAttestor("attestor542920680")
+   *           .setAttestation(AttestationOccurrence.newBuilder().build())
+   *           .setOccurrenceNote("occurrenceNote1722072419")
+   *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+   *           .build();
+   *   ApiFuture future =
+   *       validationHelperV1Client.validateAttestationOccurrenceCallable().futureCall(request);
+   *   // Do something.
+   *   Service.ValidateAttestationOccurrenceResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable() { + return stub.validateAttestationOccurrenceCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java new file mode 100644 index 00000000..b3adada0 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java @@ -0,0 +1,190 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; +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 ValidationHelperV1Client}. + * + *

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

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

{@code
+ * ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
+ *     ValidationHelperV1Settings.newBuilder();
+ * validationHelperV1SettingsBuilder
+ *     .validateAttestationOccurrenceSettings()
+ *     .setRetrySettings(
+ *         validationHelperV1SettingsBuilder
+ *             .validateAttestationOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ *     validationHelperV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ValidationHelperV1Settings extends ClientSettings { + + /** Returns the object with the settings used for calls to validateAttestationOccurrence. */ + public UnaryCallSettings< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings() { + return ((ValidationHelperV1StubSettings) getStubSettings()) + .validateAttestationOccurrenceSettings(); + } + + public static final ValidationHelperV1Settings create(ValidationHelperV1StubSettings stub) + throws IOException { + return new ValidationHelperV1Settings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ValidationHelperV1StubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ValidationHelperV1StubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ValidationHelperV1StubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ValidationHelperV1StubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ValidationHelperV1StubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ValidationHelperV1StubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ValidationHelperV1StubSettings.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 ValidationHelperV1Settings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ValidationHelperV1Settings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ValidationHelperV1StubSettings.newBuilder(clientContext)); + } + + protected Builder(ValidationHelperV1Settings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ValidationHelperV1StubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ValidationHelperV1StubSettings.newBuilder()); + } + + public ValidationHelperV1StubSettings.Builder getStubSettingsBuilder() { + return ((ValidationHelperV1StubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to validateAttestationOccurrence. */ + public UnaryCallSettings.Builder< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings() { + return getStubSettingsBuilder().validateAttestationOccurrenceSettings(); + } + + @Override + public ValidationHelperV1Settings build() throws IOException { + return new ValidationHelperV1Settings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json new file mode 100644 index 00000000..e5c1b6f2 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.cloud.binaryauthorization.v1", + "libraryPackage": "com.google.protos.google.cloud.binaryauthorization.v1", + "services": { + "BinauthzManagementServiceV1": { + "clients": { + "grpc": { + "libraryClient": "BinauthzManagementServiceV1Client", + "rpcs": { + "CreateAttestor": { + "methods": ["createAttestor", "createAttestor", "createAttestor", "createAttestorCallable"] + }, + "DeleteAttestor": { + "methods": ["deleteAttestor", "deleteAttestor", "deleteAttestor", "deleteAttestorCallable"] + }, + "GetAttestor": { + "methods": ["getAttestor", "getAttestor", "getAttestor", "getAttestorCallable"] + }, + "GetPolicy": { + "methods": ["getPolicy", "getPolicy", "getPolicy", "getPolicyCallable"] + }, + "ListAttestors": { + "methods": ["listAttestors", "listAttestors", "listAttestors", "listAttestorsPagedCallable", "listAttestorsCallable"] + }, + "UpdateAttestor": { + "methods": ["updateAttestor", "updateAttestor", "updateAttestorCallable"] + }, + "UpdatePolicy": { + "methods": ["updatePolicy", "updatePolicy", "updatePolicyCallable"] + } + } + } + } + }, + "SystemPolicyV1": { + "clients": { + "grpc": { + "libraryClient": "SystemPolicyV1Client", + "rpcs": { + "GetSystemPolicy": { + "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"] + } + } + } + } + }, + "ValidationHelperV1": { + "clients": { + "grpc": { + "libraryClient": "ValidationHelperV1Client", + "rpcs": { + "ValidateAttestationOccurrence": { + "methods": ["validateAttestationOccurrence", "validateAttestationOccurrenceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java new file mode 100644 index 00000000..3c020298 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java @@ -0,0 +1,80 @@ +/* + * 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. + */ + +/** + * A client to Binary Authorization API + * + *

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

======================= BinauthzManagementServiceV1Client ======================= + * + *

Service Description: Google Cloud Management Service for Binary Authorization admission + * policies and attestation authorities. + * + *

This API implements a REST model with the following objects: + * + *

    + *
  • [Policy][google.cloud.binaryauthorization.v1.Policy] + *
  • [Attestor][google.cloud.binaryauthorization.v1.Attestor] + *
+ * + *

Sample for BinauthzManagementServiceV1Client: + * + *

{@code
+ * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ *     BinauthzManagementServiceV1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
+ * }
+ * }
+ * + *

======================= SystemPolicyV1Client ======================= + * + *

Service Description: API for working with the system policy. + * + *

Sample for SystemPolicyV1Client: + * + *

{@code
+ * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
+ * }
+ * }
+ * + *

======================= ValidationHelperV1Client ======================= + * + *

Service Description: BinAuthz Attestor verification + * + *

Sample for ValidationHelperV1Client: + * + *

{@code
+ * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
+ *   Service.ValidateAttestationOccurrenceRequest request =
+ *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
+ *           .setAttestor("attestor542920680")
+ *           .setAttestation(AttestationOccurrence.newBuilder().build())
+ *           .setOccurrenceNote("occurrenceNote1722072419")
+ *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
+ *           .build();
+ *   Service.ValidateAttestationOccurrenceResponse response =
+ *       validationHelperV1Client.validateAttestationOccurrence(request);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.protos.google.cloud.binaryauthorization.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java new file mode 100644 index 00000000..a5f29095 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java @@ -0,0 +1,73 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the BinauthzManagementServiceV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class BinauthzManagementServiceV1Stub implements BackgroundResource { + + public UnaryCallable getPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getPolicyCallable()"); + } + + public UnaryCallable updatePolicyCallable() { + throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()"); + } + + public UnaryCallable createAttestorCallable() { + throw new UnsupportedOperationException("Not implemented: createAttestorCallable()"); + } + + public UnaryCallable getAttestorCallable() { + throw new UnsupportedOperationException("Not implemented: getAttestorCallable()"); + } + + public UnaryCallable updateAttestorCallable() { + throw new UnsupportedOperationException("Not implemented: updateAttestorCallable()"); + } + + public UnaryCallable + listAttestorsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listAttestorsPagedCallable()"); + } + + public UnaryCallable + listAttestorsCallable() { + throw new UnsupportedOperationException("Not implemented: listAttestorsCallable()"); + } + + public UnaryCallable deleteAttestorCallable() { + throw new UnsupportedOperationException("Not implemented: deleteAttestorCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java new file mode 100644 index 00000000..e939c961 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java @@ -0,0 +1,524 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +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.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 com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +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 BinauthzManagementServiceV1Stub}. + * + *

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

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

{@code
+ * BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
+ *     BinauthzManagementServiceV1StubSettings.newBuilder();
+ * binauthzManagementServiceV1SettingsBuilder
+ *     .getPolicySettings()
+ *     .setRetrySettings(
+ *         binauthzManagementServiceV1SettingsBuilder
+ *             .getPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * BinauthzManagementServiceV1StubSettings binauthzManagementServiceV1Settings =
+ *     binauthzManagementServiceV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class BinauthzManagementServiceV1StubSettings + 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 getPolicySettings; + private final UnaryCallSettings + updatePolicySettings; + private final UnaryCallSettings + createAttestorSettings; + private final UnaryCallSettings + getAttestorSettings; + private final UnaryCallSettings + updateAttestorSettings; + private final PagedCallSettings< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings; + private final UnaryCallSettings deleteAttestorSettings; + + private static final PagedListDescriptor< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor> + LIST_ATTESTORS_PAGE_STR_DESC = + new PagedListDescriptor< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public Service.ListAttestorsRequest injectToken( + Service.ListAttestorsRequest payload, String token) { + return Service.ListAttestorsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public Service.ListAttestorsRequest injectPageSize( + Service.ListAttestorsRequest payload, int pageSize) { + return Service.ListAttestorsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(Service.ListAttestorsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(Service.ListAttestorsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + Service.ListAttestorsResponse payload) { + return payload.getAttestorsList() == null + ? ImmutableList.of() + : payload.getAttestorsList(); + } + }; + + private static final PagedListResponseFactory< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + LIST_ATTESTORS_PAGE_STR_FACT = + new PagedListResponseFactory< + Service.ListAttestorsRequest, + Service.ListAttestorsResponse, + ListAttestorsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + Service.ListAttestorsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + Service.ListAttestorsRequest, + Service.ListAttestorsResponse, + Resources.Attestor> + pageContext = + PageContext.create(callable, LIST_ATTESTORS_PAGE_STR_DESC, request, context); + return ListAttestorsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to getPolicy. */ + public UnaryCallSettings getPolicySettings() { + return getPolicySettings; + } + + /** Returns the object with the settings used for calls to updatePolicy. */ + public UnaryCallSettings updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the object with the settings used for calls to createAttestor. */ + public UnaryCallSettings + createAttestorSettings() { + return createAttestorSettings; + } + + /** Returns the object with the settings used for calls to getAttestor. */ + public UnaryCallSettings getAttestorSettings() { + return getAttestorSettings; + } + + /** Returns the object with the settings used for calls to updateAttestor. */ + public UnaryCallSettings + updateAttestorSettings() { + return updateAttestorSettings; + } + + /** Returns the object with the settings used for calls to listAttestors. */ + public PagedCallSettings< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings() { + return listAttestorsSettings; + } + + /** Returns the object with the settings used for calls to deleteAttestor. */ + public UnaryCallSettings deleteAttestorSettings() { + return deleteAttestorSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public BinauthzManagementServiceV1Stub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcBinauthzManagementServiceV1Stub.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 "binaryauthorization.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "binaryauthorization.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** 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(BinauthzManagementServiceV1StubSettings.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 BinauthzManagementServiceV1StubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getPolicySettings = settingsBuilder.getPolicySettings().build(); + updatePolicySettings = settingsBuilder.updatePolicySettings().build(); + createAttestorSettings = settingsBuilder.createAttestorSettings().build(); + getAttestorSettings = settingsBuilder.getAttestorSettings().build(); + updateAttestorSettings = settingsBuilder.updateAttestorSettings().build(); + listAttestorsSettings = settingsBuilder.listAttestorsSettings().build(); + deleteAttestorSettings = settingsBuilder.deleteAttestorSettings().build(); + } + + /** Builder for BinauthzManagementServiceV1StubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getPolicySettings; + private final UnaryCallSettings.Builder + updatePolicySettings; + private final UnaryCallSettings.Builder + createAttestorSettings; + private final UnaryCallSettings.Builder + getAttestorSettings; + private final UnaryCallSettings.Builder + updateAttestorSettings; + private final PagedCallSettings.Builder< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings; + private final UnaryCallSettings.Builder + deleteAttestorSettings; + 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.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(100L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(60000L)) + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(600000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(600000L)) + .setTotalTimeout(Duration.ofMillis(600000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + getAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listAttestorsSettings = PagedCallSettings.newBuilder(LIST_ATTESTORS_PAGE_STR_FACT); + deleteAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getPolicySettings, + updatePolicySettings, + createAttestorSettings, + getAttestorSettings, + updateAttestorSettings, + listAttestorsSettings, + deleteAttestorSettings); + initDefaults(this); + } + + protected Builder(BinauthzManagementServiceV1StubSettings settings) { + super(settings); + + getPolicySettings = settings.getPolicySettings.toBuilder(); + updatePolicySettings = settings.updatePolicySettings.toBuilder(); + createAttestorSettings = settings.createAttestorSettings.toBuilder(); + getAttestorSettings = settings.getAttestorSettings.toBuilder(); + updateAttestorSettings = settings.updateAttestorSettings.toBuilder(); + listAttestorsSettings = settings.listAttestorsSettings.toBuilder(); + deleteAttestorSettings = settings.deleteAttestorSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + getPolicySettings, + updatePolicySettings, + createAttestorSettings, + getAttestorSettings, + updateAttestorSettings, + listAttestorsSettings, + deleteAttestorSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updatePolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createAttestorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .getAttestorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateAttestorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listAttestorsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteAttestorSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getPolicy. */ + public UnaryCallSettings.Builder + getPolicySettings() { + return getPolicySettings; + } + + /** Returns the builder for the settings used for calls to updatePolicy. */ + public UnaryCallSettings.Builder + updatePolicySettings() { + return updatePolicySettings; + } + + /** Returns the builder for the settings used for calls to createAttestor. */ + public UnaryCallSettings.Builder + createAttestorSettings() { + return createAttestorSettings; + } + + /** Returns the builder for the settings used for calls to getAttestor. */ + public UnaryCallSettings.Builder + getAttestorSettings() { + return getAttestorSettings; + } + + /** Returns the builder for the settings used for calls to updateAttestor. */ + public UnaryCallSettings.Builder + updateAttestorSettings() { + return updateAttestorSettings; + } + + /** Returns the builder for the settings used for calls to listAttestors. */ + public PagedCallSettings.Builder< + Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> + listAttestorsSettings() { + return listAttestorsSettings; + } + + /** Returns the builder for the settings used for calls to deleteAttestor. */ + public UnaryCallSettings.Builder + deleteAttestorSettings() { + return deleteAttestorSettings; + } + + @Override + public BinauthzManagementServiceV1StubSettings build() throws IOException { + return new BinauthzManagementServiceV1StubSettings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java new file mode 100644 index 00000000..5fc1fef3 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the BinauthzManagementServiceV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcBinauthzManagementServiceV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java new file mode 100644 index 00000000..87b697b2 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java @@ -0,0 +1,369 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +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.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the BinauthzManagementServiceV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcBinauthzManagementServiceV1Stub extends BinauthzManagementServiceV1Stub { + private static final MethodDescriptor + getPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updatePolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createAttestorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.CreateAttestorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getAttestorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.GetAttestorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateAttestorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.UpdateAttestorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listAttestorsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.ListAttestorsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(Service.ListAttestorsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteAttestorMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.DeleteAttestorRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private final UnaryCallable getPolicyCallable; + private final UnaryCallable updatePolicyCallable; + private final UnaryCallable + createAttestorCallable; + private final UnaryCallable getAttestorCallable; + private final UnaryCallable + updateAttestorCallable; + private final UnaryCallable + listAttestorsCallable; + private final UnaryCallable + listAttestorsPagedCallable; + private final UnaryCallable deleteAttestorCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcBinauthzManagementServiceV1Stub create( + BinauthzManagementServiceV1StubSettings settings) throws IOException { + return new GrpcBinauthzManagementServiceV1Stub(settings, ClientContext.create(settings)); + } + + public static final GrpcBinauthzManagementServiceV1Stub create(ClientContext clientContext) + throws IOException { + return new GrpcBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcBinauthzManagementServiceV1Stub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings.newBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcBinauthzManagementServiceV1CallableFactory()); + } + + /** + * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings updatePolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("policy.name", String.valueOf(request.getPolicy().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + createAttestorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createAttestorMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings getAttestorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getAttestorMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + updateAttestorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateAttestorMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("attestor.name", String.valueOf(request.getAttestor().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings + listAttestorsTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listAttestorsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteAttestorTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteAttestorMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.createAttestorCallable = + callableFactory.createUnaryCallable( + createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); + this.getAttestorCallable = + callableFactory.createUnaryCallable( + getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); + this.updateAttestorCallable = + callableFactory.createUnaryCallable( + updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); + this.listAttestorsCallable = + callableFactory.createUnaryCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.listAttestorsPagedCallable = + callableFactory.createPagedCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.deleteAttestorCallable = + callableFactory.createUnaryCallable( + deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public UnaryCallable createAttestorCallable() { + return createAttestorCallable; + } + + @Override + public UnaryCallable getAttestorCallable() { + return getAttestorCallable; + } + + @Override + public UnaryCallable updateAttestorCallable() { + return updateAttestorCallable; + } + + @Override + public UnaryCallable + listAttestorsCallable() { + return listAttestorsCallable; + } + + @Override + public UnaryCallable + listAttestorsPagedCallable() { + return listAttestorsPagedCallable; + } + + @Override + public UnaryCallable deleteAttestorCallable() { + return deleteAttestorCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java new file mode 100644 index 00000000..ee975437 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SystemPolicyV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcSystemPolicyV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java new file mode 100644 index 00000000..d804a683 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java @@ -0,0 +1,165 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +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.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SystemPolicyV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcSystemPolicyV1Stub extends SystemPolicyV1Stub { + private static final MethodDescriptor + getSystemPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(Service.GetSystemPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) + .build(); + + private final UnaryCallable + getSystemPolicyCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSystemPolicyV1Stub create(SystemPolicyV1StubSettings settings) + throws IOException { + return new GrpcSystemPolicyV1Stub(settings, ClientContext.create(settings)); + } + + public static final GrpcSystemPolicyV1Stub create(ClientContext clientContext) + throws IOException { + return new GrpcSystemPolicyV1Stub( + SystemPolicyV1StubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSystemPolicyV1Stub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSystemPolicyV1Stub( + SystemPolicyV1StubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSystemPolicyV1Stub, 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 GrpcSystemPolicyV1Stub(SystemPolicyV1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcSystemPolicyV1CallableFactory()); + } + + /** + * Constructs an instance of GrpcSystemPolicyV1Stub, 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 GrpcSystemPolicyV1Stub( + SystemPolicyV1StubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings + getSystemPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSystemPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getSystemPolicyCallable = + callableFactory.createUnaryCallable( + getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getSystemPolicyCallable() { + return getSystemPolicyCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java new file mode 100644 index 00000000..097845f4 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the ValidationHelperV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcValidationHelperV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java new file mode 100644 index 00000000..c990a23b --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java @@ -0,0 +1,184 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +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.UnaryCallable; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ValidationHelperV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcValidationHelperV1Stub extends ValidationHelperV1Stub { + private static final MethodDescriptor< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence") + .setRequestMarshaller( + ProtoUtils.marshaller( + Service.ValidateAttestationOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + Service.ValidateAttestationOccurrenceResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcValidationHelperV1Stub create(ValidationHelperV1StubSettings settings) + throws IOException { + return new GrpcValidationHelperV1Stub(settings, ClientContext.create(settings)); + } + + public static final GrpcValidationHelperV1Stub create(ClientContext clientContext) + throws IOException { + return new GrpcValidationHelperV1Stub( + ValidationHelperV1StubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcValidationHelperV1Stub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcValidationHelperV1Stub( + ValidationHelperV1StubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcValidationHelperV1Stub, 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 GrpcValidationHelperV1Stub( + ValidationHelperV1StubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcValidationHelperV1CallableFactory()); + } + + /** + * Constructs an instance of GrpcValidationHelperV1Stub, 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 GrpcValidationHelperV1Stub( + ValidationHelperV1StubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(validateAttestationOccurrenceMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("attestor", String.valueOf(request.getAttestor())); + return params.build(); + }) + .build(); + + this.validateAttestationOccurrenceCallable = + callableFactory.createUnaryCallable( + validateAttestationOccurrenceTransportSettings, + settings.validateAttestationOccurrenceSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable() { + return validateAttestationOccurrenceCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java new file mode 100644 index 00000000..9d52db96 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java @@ -0,0 +1,40 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SystemPolicyV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class SystemPolicyV1Stub implements BackgroundResource { + + public UnaryCallable getSystemPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getSystemPolicyCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java new file mode 100644 index 00000000..81a0de06 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java @@ -0,0 +1,267 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +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 SystemPolicyV1Stub}. + * + *

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

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

{@code
+ * SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder =
+ *     SystemPolicyV1StubSettings.newBuilder();
+ * systemPolicyV1SettingsBuilder
+ *     .getSystemPolicySettings()
+ *     .setRetrySettings(
+ *         systemPolicyV1SettingsBuilder
+ *             .getSystemPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class SystemPolicyV1StubSettings 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 + getSystemPolicySettings; + + /** Returns the object with the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings + getSystemPolicySettings() { + return getSystemPolicySettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SystemPolicyV1Stub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSystemPolicyV1Stub.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 "binaryauthorization.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "binaryauthorization.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** 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(SystemPolicyV1StubSettings.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 SystemPolicyV1StubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getSystemPolicySettings = settingsBuilder.getSystemPolicySettings().build(); + } + + /** Builder for SystemPolicyV1StubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder + getSystemPolicySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getSystemPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(getSystemPolicySettings); + initDefaults(this); + } + + protected Builder(SystemPolicyV1StubSettings settings) { + super(settings); + + getSystemPolicySettings = settings.getSystemPolicySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(getSystemPolicySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getSystemPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings.Builder + getSystemPolicySettings() { + return getSystemPolicySettings; + } + + @Override + public SystemPolicyV1StubSettings build() throws IOException { + return new SystemPolicyV1StubSettings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java new file mode 100644 index 00000000..af7b3e0a --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java @@ -0,0 +1,43 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the ValidationHelperV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ValidationHelperV1Stub implements BackgroundResource { + + public UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable() { + throw new UnsupportedOperationException( + "Not implemented: validateAttestationOccurrenceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java new file mode 100644 index 00000000..1e45f510 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java @@ -0,0 +1,278 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +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 ValidationHelperV1Stub}. + * + *

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

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

{@code
+ * ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder =
+ *     ValidationHelperV1StubSettings.newBuilder();
+ * validationHelperV1SettingsBuilder
+ *     .validateAttestationOccurrenceSettings()
+ *     .setRetrySettings(
+ *         validationHelperV1SettingsBuilder
+ *             .validateAttestationOccurrenceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ValidationHelperV1StubSettings validationHelperV1Settings =
+ *     validationHelperV1SettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ValidationHelperV1StubSettings 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< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings; + + /** Returns the object with the settings used for calls to validateAttestationOccurrence. */ + public UnaryCallSettings< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings() { + return validateAttestationOccurrenceSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ValidationHelperV1Stub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcValidationHelperV1Stub.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 "binaryauthorization.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "binaryauthorization.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** 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(ValidationHelperV1StubSettings.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 ValidationHelperV1StubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + validateAttestationOccurrenceSettings = + settingsBuilder.validateAttestationOccurrenceSettings().build(); + } + + /** Builder for ValidationHelperV1StubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + validateAttestationOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(validateAttestationOccurrenceSettings); + initDefaults(this); + } + + protected Builder(ValidationHelperV1StubSettings settings) { + super(settings); + + validateAttestationOccurrenceSettings = + settings.validateAttestationOccurrenceSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(validateAttestationOccurrenceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .validateAttestationOccurrenceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to validateAttestationOccurrence. */ + public UnaryCallSettings.Builder< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceSettings() { + return validateAttestationOccurrenceSettings; + } + + @Override + public ValidationHelperV1StubSettings build() throws IOException { + return new ValidationHelperV1StubSettings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java new file mode 100644 index 00000000..f796cf02 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java @@ -0,0 +1,605 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +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.Empty; +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 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 BinauthzManagementServiceV1ClientTest { + private static MockBinauthzManagementServiceV1 mockBinauthzManagementServiceV1; + private static MockServiceHelper mockServiceHelper; + private LocalChannelProvider channelProvider; + private BinauthzManagementServiceV1Client client; + + @BeforeClass + public static void startStaticServer() { + mockBinauthzManagementServiceV1 = new MockBinauthzManagementServiceV1(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), + Arrays.asList(mockBinauthzManagementServiceV1)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + BinauthzManagementServiceV1Settings settings = + BinauthzManagementServiceV1Settings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BinauthzManagementServiceV1Client.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getPolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + + Resources.Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetPolicyRequest actualRequest = ((Service.GetPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest2() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + String name = "name3373707"; + + Resources.Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetPolicyRequest actualRequest = ((Service.GetPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + String name = "name3373707"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + Resources.Policy policy = Resources.Policy.newBuilder().build(); + + Resources.Policy actualResponse = client.updatePolicy(policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.UpdatePolicyRequest actualRequest = + ((Service.UpdatePolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(policy, actualRequest.getPolicy()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + Resources.Policy policy = Resources.Policy.newBuilder().build(); + client.updatePolicy(policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + + Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.CreateAttestorRequest actualRequest = + ((Service.CreateAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertEquals(attestorId, actualRequest.getAttestorId()); + Assert.assertEquals(attestor, actualRequest.getAttestor()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAttestorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest2() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + String parent = "parent-995424086"; + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + + Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.CreateAttestorRequest actualRequest = + ((Service.CreateAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertEquals(attestorId, actualRequest.getAttestorId()); + Assert.assertEquals(attestor, actualRequest.getAttestor()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createAttestorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + String parent = "parent-995424086"; + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + Resources.Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetAttestorRequest actualRequest = ((Service.GetAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAttestorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest2() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + String name = "name3373707"; + + Resources.Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetAttestorRequest actualRequest = ((Service.GetAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getAttestorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + String name = "name3373707"; + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + + Resources.Attestor actualResponse = client.updateAttestor(attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.UpdateAttestorRequest actualRequest = + ((Service.UpdateAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(attestor, actualRequest.getAttestor()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateAttestorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + client.updateAttestor(attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest() throws Exception { + Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); + Service.ListAttestorsResponse expectedResponse = + Service.ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.ListAttestorsRequest actualRequest = + ((Service.ListAttestorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent.toString(), actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAttestorsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest2() throws Exception { + Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); + Service.ListAttestorsResponse expectedResponse = + Service.ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + String parent = "parent-995424086"; + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.ListAttestorsRequest actualRequest = + ((Service.ListAttestorsRequest) actualRequests.get(0)); + + Assert.assertEquals(parent, actualRequest.getParent()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listAttestorsExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + String parent = "parent-995424086"; + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + client.deleteAttestor(name); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.DeleteAttestorRequest actualRequest = + ((Service.DeleteAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAttestorExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockBinauthzManagementServiceV1.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteAttestor(name); + + List actualRequests = mockBinauthzManagementServiceV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.DeleteAttestorRequest actualRequest = + ((Service.DeleteAttestorRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteAttestorExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockBinauthzManagementServiceV1.addException(exception); + + try { + String name = "name3373707"; + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java new file mode 100644 index 00000000..441abf2e --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockBinauthzManagementServiceV1 implements MockGrpcService { + private final MockBinauthzManagementServiceV1Impl serviceImpl; + + public MockBinauthzManagementServiceV1() { + serviceImpl = new MockBinauthzManagementServiceV1Impl(); + } + + @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java new file mode 100644 index 00000000..43c5cbd3 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java @@ -0,0 +1,209 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Grpc.BinauthzManagementServiceV1ImplBase; +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 MockBinauthzManagementServiceV1Impl extends BinauthzManagementServiceV1ImplBase { + private List requests; + private Queue responses; + + public MockBinauthzManagementServiceV1Impl() { + 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 getPolicy( + Service.GetPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Policy) { + requests.add(request); + responseObserver.onNext(((Resources.Policy) 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 GetPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updatePolicy( + Service.UpdatePolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Policy) { + requests.add(request); + responseObserver.onNext(((Resources.Policy) 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 UpdatePolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Policy.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createAttestor( + Service.CreateAttestorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Attestor) { + requests.add(request); + responseObserver.onNext(((Resources.Attestor) 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 CreateAttestor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Attestor.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getAttestor( + Service.GetAttestorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Attestor) { + requests.add(request); + responseObserver.onNext(((Resources.Attestor) 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 GetAttestor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Attestor.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void updateAttestor( + Service.UpdateAttestorRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Attestor) { + requests.add(request); + responseObserver.onNext(((Resources.Attestor) 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 UpdateAttestor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Attestor.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listAttestors( + Service.ListAttestorsRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Service.ListAttestorsResponse) { + requests.add(request); + responseObserver.onNext(((Service.ListAttestorsResponse) 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 ListAttestors, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Service.ListAttestorsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteAttestor( + Service.DeleteAttestorRequest 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 DeleteAttestor, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Empty.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java new file mode 100644 index 00000000..eca15998 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSystemPolicyV1 implements MockGrpcService { + private final MockSystemPolicyV1Impl serviceImpl; + + public MockSystemPolicyV1() { + serviceImpl = new MockSystemPolicyV1Impl(); + } + + @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java new file mode 100644 index 00000000..b329f628 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java @@ -0,0 +1,81 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Grpc.SystemPolicyV1ImplBase; +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 MockSystemPolicyV1Impl extends SystemPolicyV1ImplBase { + private List requests; + private Queue responses; + + public MockSystemPolicyV1Impl() { + 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 getSystemPolicy( + Service.GetSystemPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Resources.Policy) { + requests.add(request); + responseObserver.onNext(((Resources.Policy) 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 GetSystemPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Resources.Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java new file mode 100644 index 00000000..4c056166 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockValidationHelperV1 implements MockGrpcService { + private final MockValidationHelperV1Impl serviceImpl; + + public MockValidationHelperV1() { + serviceImpl = new MockValidationHelperV1Impl(); + } + + @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java new file mode 100644 index 00000000..31550b6b --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java @@ -0,0 +1,82 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.protobuf.AbstractMessage; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Grpc.ValidationHelperV1ImplBase; +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 MockValidationHelperV1Impl extends ValidationHelperV1ImplBase { + private List requests; + private Queue responses; + + public MockValidationHelperV1Impl() { + 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 validateAttestationOccurrence( + Service.ValidateAttestationOccurrenceRequest request, + StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Service.ValidateAttestationOccurrenceResponse) { + requests.add(request); + responseObserver.onNext(((Service.ValidateAttestationOccurrenceResponse) 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 ValidateAttestationOccurrence, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Service.ValidateAttestationOccurrenceResponse.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java new file mode 100644 index 00000000..dc4ccef1 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java @@ -0,0 +1,178 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +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 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 SystemPolicyV1ClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockSystemPolicyV1 mockSystemPolicyV1; + private LocalChannelProvider channelProvider; + private SystemPolicyV1Client client; + + @BeforeClass + public static void startStaticServer() { + mockSystemPolicyV1 = new MockSystemPolicyV1(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockSystemPolicyV1)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SystemPolicyV1Settings settings = + SystemPolicyV1Settings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SystemPolicyV1Client.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getSystemPolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockSystemPolicyV1.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + + Resources.Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSystemPolicyV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetSystemPolicyRequest actualRequest = + ((Service.GetSystemPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSystemPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSystemPolicyV1.addException(exception); + + try { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSystemPolicyTest2() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockSystemPolicyV1.addResponse(expectedResponse); + + String name = "name3373707"; + + Resources.Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSystemPolicyV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.GetSystemPolicyRequest actualRequest = + ((Service.GetSystemPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSystemPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSystemPolicyV1.addException(exception); + + try { + String name = "name3373707"; + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java new file mode 100644 index 00000000..1b06c6fa --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java @@ -0,0 +1,134 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.protobuf.AbstractMessage; +import io.grafeas.v1.AttestationOccurrence; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +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 ValidationHelperV1ClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockValidationHelperV1 mockValidationHelperV1; + private LocalChannelProvider channelProvider; + private ValidationHelperV1Client client; + + @BeforeClass + public static void startStaticServer() { + mockValidationHelperV1 = new MockValidationHelperV1(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockValidationHelperV1)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ValidationHelperV1Settings settings = + ValidationHelperV1Settings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ValidationHelperV1Client.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void validateAttestationOccurrenceTest() throws Exception { + Service.ValidateAttestationOccurrenceResponse expectedResponse = + Service.ValidateAttestationOccurrenceResponse.newBuilder() + .setDenialReason("denialReason-966999989") + .build(); + mockValidationHelperV1.addResponse(expectedResponse); + + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("attestor542920680") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + + Service.ValidateAttestationOccurrenceResponse actualResponse = + client.validateAttestationOccurrence(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockValidationHelperV1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + Service.ValidateAttestationOccurrenceRequest actualRequest = + ((Service.ValidateAttestationOccurrenceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAttestor(), actualRequest.getAttestor()); + Assert.assertEquals(request.getAttestation(), actualRequest.getAttestation()); + Assert.assertEquals(request.getOccurrenceNote(), actualRequest.getOccurrenceNote()); + Assert.assertEquals( + request.getOccurrenceResourceUri(), actualRequest.getOccurrenceResourceUri()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void validateAttestationOccurrenceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockValidationHelperV1.addException(exception); + + try { + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("attestor542920680") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + client.validateAttestationOccurrence(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml new file mode 100644 index 00000000..2d0f6f5d --- /dev/null +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + grpc-google-cloud-binary-authorization-v1 + GRPC library for google-cloud-binary-authorization + + com.google.cloud + google-cloud-binary-authorization-parent + 0.3.4-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-binary-authorization-v1 + + + com.google.guava + guava + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java new file mode 100644 index 00000000..fc8523b2 --- /dev/null +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java @@ -0,0 +1,1245 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Google Cloud Management Service for Binary Authorization admission policies
+ * and attestation authorities.
+ * This API implements a REST model with the following objects:
+ * * [Policy][google.cloud.binaryauthorization.v1.Policy]
+ * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +public final class BinauthzManagementServiceV1Grpc { + + private BinauthzManagementServiceV1Grpc() {} + + public static final String SERVICE_NAME = + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetPolicy", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetPolicyMethod; + if ((getGetPolicyMethod = BinauthzManagementServiceV1Grpc.getGetPolicyMethod) == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getGetPolicyMethod = BinauthzManagementServiceV1Grpc.getGetPolicyMethod) == null) { + BinauthzManagementServiceV1Grpc.getGetPolicyMethod = + getGetPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("GetPolicy")) + .build(); + } + } + } + return getGetPolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getUpdatePolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest.class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getUpdatePolicyMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getUpdatePolicyMethod; + if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod) == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod) + == null) { + BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod = + getUpdatePolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdatePolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("UpdatePolicy")) + .build(); + } + } + } + return getUpdatePolicyMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getCreateAttestorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateAttestor", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest.class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getCreateAttestorMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getCreateAttestorMethod; + if ((getCreateAttestorMethod = BinauthzManagementServiceV1Grpc.getCreateAttestorMethod) + == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getCreateAttestorMethod = BinauthzManagementServiceV1Grpc.getCreateAttestorMethod) + == null) { + BinauthzManagementServiceV1Grpc.getCreateAttestorMethod = + getCreateAttestorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttestor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .Attestor.getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("CreateAttestor")) + .build(); + } + } + } + return getCreateAttestorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getGetAttestorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetAttestor", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest.class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getGetAttestorMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getGetAttestorMethod; + if ((getGetAttestorMethod = BinauthzManagementServiceV1Grpc.getGetAttestorMethod) == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getGetAttestorMethod = BinauthzManagementServiceV1Grpc.getGetAttestorMethod) == null) { + BinauthzManagementServiceV1Grpc.getGetAttestorMethod = + getGetAttestorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttestor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetAttestorRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .Attestor.getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("GetAttestor")) + .build(); + } + } + } + return getGetAttestorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getUpdateAttestorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateAttestor", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest.class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getUpdateAttestorMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getUpdateAttestorMethod; + if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod) + == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod) + == null) { + BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod = + getUpdateAttestorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttestor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .Attestor.getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("UpdateAttestor")) + .build(); + } + } + } + return getUpdateAttestorMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + getListAttestorsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListAttestors", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest.class, + responseType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + getListAttestorsMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + getListAttestorsMethod; + if ((getListAttestorsMethod = BinauthzManagementServiceV1Grpc.getListAttestorsMethod) == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getListAttestorsMethod = BinauthzManagementServiceV1Grpc.getListAttestorsMethod) + == null) { + BinauthzManagementServiceV1Grpc.getListAttestorsMethod = + getListAttestorsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttestors")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse.getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("ListAttestors")) + .build(); + } + } + } + return getListAttestorsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, + com.google.protobuf.Empty> + getDeleteAttestorMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteAttestor", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, + com.google.protobuf.Empty> + getDeleteAttestorMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, + com.google.protobuf.Empty> + getDeleteAttestorMethod; + if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod) + == null) { + synchronized (BinauthzManagementServiceV1Grpc.class) { + if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod) + == null) { + BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod = + getDeleteAttestorMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAttestor")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new BinauthzManagementServiceV1MethodDescriptorSupplier("DeleteAttestor")) + .build(); + } + } + } + return getDeleteAttestorMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static BinauthzManagementServiceV1Stub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BinauthzManagementServiceV1Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1Stub(channel, callOptions); + } + }; + return BinauthzManagementServiceV1Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static BinauthzManagementServiceV1BlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BinauthzManagementServiceV1BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1BlockingStub(channel, callOptions); + } + }; + return BinauthzManagementServiceV1BlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static BinauthzManagementServiceV1FutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public BinauthzManagementServiceV1FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1FutureStub(channel, callOptions); + } + }; + return BinauthzManagementServiceV1FutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Google Cloud Management Service for Binary Authorization admission policies
+   * and attestation authorities.
+   * This API implements a REST model with the following objects:
+   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
+   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+   * 
+ */ + public abstract static class BinauthzManagementServiceV1ImplBase + implements io.grpc.BindableService { + + /** + * + * + *
+     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
+     * image. There is at most one policy per project. All image admission
+     * requests are permitted if a project has no policy.
+     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+     * 
+ */ + public void getPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
+     * 
+ */ + public void updatePolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdatePolicyMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+     * 
+ */ + public void createAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateAttestorMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void getAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetAttestorMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void updateAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateAttestorMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns INVALID_ARGUMENT if the project does not exist.
+     * 
+ */ + public void listAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getListAttestorsMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void deleteAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteAttestorMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( + this, METHODID_GET_POLICY))) + .addMethod( + getUpdatePolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdatePolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( + this, METHODID_UPDATE_POLICY))) + .addMethod( + getCreateAttestorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( + this, METHODID_CREATE_ATTESTOR))) + .addMethod( + getGetAttestorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( + this, METHODID_GET_ATTESTOR))) + .addMethod( + getUpdateAttestorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( + this, METHODID_UPDATE_ATTESTOR))) + .addMethod( + getListAttestorsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse>(this, METHODID_LIST_ATTESTORS))) + .addMethod( + getDeleteAttestorMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest, + com.google.protobuf.Empty>(this, METHODID_DELETE_ATTESTOR))) + .build(); + } + } + + /** + * + * + *
+   * Google Cloud Management Service for Binary Authorization admission policies
+   * and attestation authorities.
+   * This API implements a REST model with the following objects:
+   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
+   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+   * 
+ */ + public static final class BinauthzManagementServiceV1Stub + extends io.grpc.stub.AbstractAsyncStub { + private BinauthzManagementServiceV1Stub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BinauthzManagementServiceV1Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1Stub(channel, callOptions); + } + + /** + * + * + *
+     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
+     * image. There is at most one policy per project. All image admission
+     * requests are permitted if a project has no policy.
+     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+     * 
+ */ + public void getPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
+     * 
+ */ + public void updatePolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+     * 
+ */ + public void createAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void getAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetAttestorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void updateAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns INVALID_ARGUMENT if the project does not exist.
+     * 
+ */ + public void listAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListAttestorsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public void deleteAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * Google Cloud Management Service for Binary Authorization admission policies
+   * and attestation authorities.
+   * This API implements a REST model with the following objects:
+   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
+   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+   * 
+ */ + public static final class BinauthzManagementServiceV1BlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private BinauthzManagementServiceV1BlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BinauthzManagementServiceV1BlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1BlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
+     * image. There is at most one policy per project. All image admission
+     * requests are permitted if a project has no policy.
+     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetPolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy updatePolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor createAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateAttestorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetAttestorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor updateAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateAttestorMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns INVALID_ARGUMENT if the project does not exist.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + listAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListAttestorsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.protobuf.Empty deleteAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteAttestorMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Google Cloud Management Service for Binary Authorization admission policies
+   * and attestation authorities.
+   * This API implements a REST model with the following objects:
+   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
+   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
+   * 
+ */ + public static final class BinauthzManagementServiceV1FutureStub + extends io.grpc.stub.AbstractFutureStub { + private BinauthzManagementServiceV1FutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected BinauthzManagementServiceV1FutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new BinauthzManagementServiceV1FutureStub(channel, callOptions); + } + + /** + * + * + *
+     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
+     * image. There is at most one policy per project. All image admission
+     * requests are permitted if a project has no policy.
+     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + updatePolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + createAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetAttestorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + updateAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * Returns INVALID_ARGUMENT if the project does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> + listAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListAttestorsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_POLICY = 0; + private static final int METHODID_UPDATE_POLICY = 1; + private static final int METHODID_CREATE_ATTESTOR = 2; + private static final int METHODID_GET_ATTESTOR = 3; + private static final int METHODID_UPDATE_ATTESTOR = 4; + private static final int METHODID_LIST_ATTESTORS = 5; + private static final int METHODID_DELETE_ATTESTOR = 6; + + 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 BinauthzManagementServiceV1ImplBase serviceImpl; + private final int methodId; + + MethodHandlers(BinauthzManagementServiceV1ImplBase 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_GET_POLICY: + serviceImpl.getPolicy( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) + responseObserver); + break; + case METHODID_UPDATE_POLICY: + serviceImpl.updatePolicy( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) + responseObserver); + break; + case METHODID_CREATE_ATTESTOR: + serviceImpl.createAttestor( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) + responseObserver); + break; + case METHODID_GET_ATTESTOR: + serviceImpl.getAttestor( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) + responseObserver); + break; + case METHODID_UPDATE_ATTESTOR: + serviceImpl.updateAttestor( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) + responseObserver); + break; + case METHODID_LIST_ATTESTORS: + serviceImpl.listAttestors( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse>) + responseObserver); + break; + case METHODID_DELETE_ATTESTOR: + serviceImpl.deleteAttestor( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) + request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class BinauthzManagementServiceV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + BinauthzManagementServiceV1BaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("BinauthzManagementServiceV1"); + } + } + + private static final class BinauthzManagementServiceV1FileDescriptorSupplier + extends BinauthzManagementServiceV1BaseDescriptorSupplier { + BinauthzManagementServiceV1FileDescriptorSupplier() {} + } + + private static final class BinauthzManagementServiceV1MethodDescriptorSupplier + extends BinauthzManagementServiceV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + BinauthzManagementServiceV1MethodDescriptorSupplier(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 (BinauthzManagementServiceV1Grpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new BinauthzManagementServiceV1FileDescriptorSupplier()) + .addMethod(getGetPolicyMethod()) + .addMethod(getUpdatePolicyMethod()) + .addMethod(getCreateAttestorMethod()) + .addMethod(getGetAttestorMethod()) + .addMethod(getUpdateAttestorMethod()) + .addMethod(getListAttestorsMethod()) + .addMethod(getDeleteAttestorMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java new file mode 100644 index 00000000..72939535 --- /dev/null +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java @@ -0,0 +1,375 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API for working with the system policy.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +public final class SystemPolicyV1Grpc { + + private SystemPolicyV1Grpc() {} + + public static final String SERVICE_NAME = "google.cloud.binaryauthorization.v1.SystemPolicyV1"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetSystemPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSystemPolicy", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .class, + responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetSystemPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getGetSystemPolicyMethod; + if ((getGetSystemPolicyMethod = SystemPolicyV1Grpc.getGetSystemPolicyMethod) == null) { + synchronized (SystemPolicyV1Grpc.class) { + if ((getGetSystemPolicyMethod = SystemPolicyV1Grpc.getGetSystemPolicyMethod) == null) { + SystemPolicyV1Grpc.getGetSystemPolicyMethod = + getGetSystemPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSystemPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance())) + .setSchemaDescriptor( + new SystemPolicyV1MethodDescriptorSupplier("GetSystemPolicy")) + .build(); + } + } + } + return getGetSystemPolicyMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SystemPolicyV1Stub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Stub(channel, callOptions); + } + }; + return SystemPolicyV1Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SystemPolicyV1BlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1BlockingStub(channel, callOptions); + } + }; + return SystemPolicyV1BlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SystemPolicyV1FutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1FutureStub(channel, callOptions); + } + }; + return SystemPolicyV1FutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public abstract static class SystemPolicyV1ImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public void getSystemPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSystemPolicyMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetSystemPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( + this, METHODID_GET_SYSTEM_POLICY))) + .build(); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1Stub + extends io.grpc.stub.AbstractAsyncStub { + private SystemPolicyV1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public void getSystemPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1BlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SystemPolicyV1BlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1BlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1BlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getSystemPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSystemPolicyMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1FutureStub + extends io.grpc.stub.AbstractFutureStub { + private SystemPolicyV1FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1FutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1FutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> + getSystemPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_SYSTEM_POLICY = 0; + + 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 SystemPolicyV1ImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SystemPolicyV1ImplBase 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_GET_SYSTEM_POLICY: + serviceImpl.getSystemPolicy( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) + 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 SystemPolicyV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SystemPolicyV1BaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SystemPolicyV1"); + } + } + + private static final class SystemPolicyV1FileDescriptorSupplier + extends SystemPolicyV1BaseDescriptorSupplier { + SystemPolicyV1FileDescriptorSupplier() {} + } + + private static final class SystemPolicyV1MethodDescriptorSupplier + extends SystemPolicyV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SystemPolicyV1MethodDescriptorSupplier(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 (SystemPolicyV1Grpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SystemPolicyV1FileDescriptorSupplier()) + .addMethod(getGetSystemPolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java new file mode 100644 index 00000000..30e0c3d1 --- /dev/null +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java @@ -0,0 +1,410 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * BinAuthz Attestor verification
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +public final class ValidationHelperV1Grpc { + + private ValidationHelperV1Grpc() {} + + public static final String SERVICE_NAME = + "google.cloud.binaryauthorization.v1.ValidationHelperV1"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + getValidateAttestationOccurrenceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ValidateAttestationOccurrence", + requestType = + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.class, + responseType = + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + getValidateAttestationOccurrenceMethod() { + io.grpc.MethodDescriptor< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + getValidateAttestationOccurrenceMethod; + if ((getValidateAttestationOccurrenceMethod = + ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod) + == null) { + synchronized (ValidationHelperV1Grpc.class) { + if ((getValidateAttestationOccurrenceMethod = + ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod) + == null) { + ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod = + getValidateAttestationOccurrenceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ValidateAttestationOccurrence")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.getDefaultInstance())) + .setSchemaDescriptor( + new ValidationHelperV1MethodDescriptorSupplier( + "ValidateAttestationOccurrence")) + .build(); + } + } + } + return getValidateAttestationOccurrenceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ValidationHelperV1Stub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ValidationHelperV1Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1Stub(channel, callOptions); + } + }; + return ValidationHelperV1Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ValidationHelperV1BlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ValidationHelperV1BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1BlockingStub(channel, callOptions); + } + }; + return ValidationHelperV1BlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ValidationHelperV1FutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ValidationHelperV1FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1FutureStub(channel, callOptions); + } + }; + return ValidationHelperV1FutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * BinAuthz Attestor verification
+   * 
+ */ + public abstract static class ValidationHelperV1ImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Returns whether the given Attestation for the given image URI
+     * was signed by the given Attestor
+     * 
+ */ + public void validateAttestationOccurrence( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getValidateAttestationOccurrenceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getValidateAttestationOccurrenceMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse>( + this, METHODID_VALIDATE_ATTESTATION_OCCURRENCE))) + .build(); + } + } + + /** + * + * + *
+   * BinAuthz Attestor verification
+   * 
+ */ + public static final class ValidationHelperV1Stub + extends io.grpc.stub.AbstractAsyncStub { + private ValidationHelperV1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ValidationHelperV1Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1Stub(channel, callOptions); + } + + /** + * + * + *
+     * Returns whether the given Attestation for the given image URI
+     * was signed by the given Attestor
+     * 
+ */ + public void validateAttestationOccurrence( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + request, + io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getValidateAttestationOccurrenceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * BinAuthz Attestor verification
+   * 
+ */ + public static final class ValidationHelperV1BlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ValidationHelperV1BlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ValidationHelperV1BlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1BlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns whether the given Attestation for the given image URI
+     * was signed by the given Attestor
+     * 
+ */ + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + validateAttestationOccurrence( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getValidateAttestationOccurrenceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * BinAuthz Attestor verification
+   * 
+ */ + public static final class ValidationHelperV1FutureStub + extends io.grpc.stub.AbstractFutureStub { + private ValidationHelperV1FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ValidationHelperV1FutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ValidationHelperV1FutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Returns whether the given Attestation for the given image URI
+     * was signed by the given Attestor
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse> + validateAttestationOccurrence( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getValidateAttestationOccurrenceMethod(), getCallOptions()), + request); + } + } + + private static final int METHODID_VALIDATE_ATTESTATION_OCCURRENCE = 0; + + 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 ValidationHelperV1ImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ValidationHelperV1ImplBase 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_VALIDATE_ATTESTATION_OCCURRENCE: + serviceImpl.validateAttestationOccurrence( + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest) + request, + (io.grpc.stub.StreamObserver< + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse>) + 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 ValidationHelperV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ValidationHelperV1BaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ValidationHelperV1"); + } + } + + private static final class ValidationHelperV1FileDescriptorSupplier + extends ValidationHelperV1BaseDescriptorSupplier { + ValidationHelperV1FileDescriptorSupplier() {} + } + + private static final class ValidationHelperV1MethodDescriptorSupplier + extends ValidationHelperV1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ValidationHelperV1MethodDescriptorSupplier(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 (ValidationHelperV1Grpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ValidationHelperV1FileDescriptorSupplier()) + .addMethod(getValidateAttestationOccurrenceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/pom.xml b/pom.xml index 77b1f900..92ad4cde 100644 --- a/pom.xml +++ b/pom.xml @@ -62,6 +62,16 @@ google-cloud-binary-authorization 0.3.4-SNAPSHOT + + com.google.api.grpc + proto-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 @@ -73,6 +83,12 @@ 0.3.4-SNAPSHOT + + io.grafeas + grafeas + 2.0.6 + + com.google.cloud google-cloud-shared-dependencies @@ -103,7 +119,9 @@ google-cloud-binary-authorization grpc-google-cloud-binary-authorization-v1beta1 + grpc-google-cloud-binary-authorization-v1 proto-google-cloud-binary-authorization-v1beta1 + proto-google-cloud-binary-authorization-v1 google-cloud-binary-authorization-bom diff --git a/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml b/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml new file mode 100644 index 00000000..70e35c15 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml new file mode 100644 index 00000000..b520f7b3 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-binary-authorization-v1 + 0.3.4-SNAPSHOT + proto-google-cloud-binary-authorization-v1 + Proto library for google-cloud-binary-authorization + + com.google.cloud + google-cloud-binary-authorization-parent + 0.3.4-SNAPSHOT + + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-common-protos + + + com.google.api + api-common + + + com.google.guava + guava + + + io.grafeas + grafeas + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java new file mode 100644 index 00000000..1281ca73 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class AttestorName implements ResourceName { + private static final PathTemplate PROJECT_ATTESTOR = + PathTemplate.createWithoutUrlEncoding("projects/{project}/attestors/{attestor}"); + private volatile Map fieldValuesMap; + private final String project; + private final String attestor; + + @Deprecated + protected AttestorName() { + project = null; + attestor = null; + } + + private AttestorName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + attestor = Preconditions.checkNotNull(builder.getAttestor()); + } + + public String getProject() { + return project; + } + + public String getAttestor() { + return attestor; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static AttestorName of(String project, String attestor) { + return newBuilder().setProject(project).setAttestor(attestor).build(); + } + + public static String format(String project, String attestor) { + return newBuilder().setProject(project).setAttestor(attestor).build().toString(); + } + + public static AttestorName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_ATTESTOR.validatedMatch( + formattedString, "AttestorName.parse: formattedString not in valid format"); + return of(matchMap.get("project"), matchMap.get("attestor")); + } + + 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 (AttestorName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_ATTESTOR.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 (attestor != null) { + fieldMapBuilder.put("attestor", attestor); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PROJECT_ATTESTOR.instantiate("project", project, "attestor", attestor); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + AttestorName that = ((AttestorName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.attestor, that.attestor); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(attestor); + return h; + } + + /** Builder for projects/{project}/attestors/{attestor}. */ + public static class Builder { + private String project; + private String attestor; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getAttestor() { + return attestor; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setAttestor(String attestor) { + this.attestor = attestor; + return this; + } + + private Builder(AttestorName attestorName) { + this.project = attestorName.project; + this.attestor = attestorName.attestor; + } + + public AttestorName build() { + return new AttestorName(this); + } + } +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java new file mode 100644 index 00000000..19f6f6a3 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java @@ -0,0 +1,254 @@ +/* + * 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.core.BetaApi; +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; +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 PolicyName implements ResourceName { + private static final PathTemplate PROJECT = + PathTemplate.createWithoutUrlEncoding("projects/{project}/policy"); + private static final PathTemplate LOCATION = + PathTemplate.createWithoutUrlEncoding("locations/{location}/policy"); + private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; + private final String project; + private final String location; + + @Deprecated + protected PolicyName() { + project = null; + location = null; + } + + private PolicyName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = null; + pathTemplate = PROJECT; + } + + private PolicyName(LocationBuilder builder) { + location = Preconditions.checkNotNull(builder.getLocation()); + project = null; + pathTemplate = LOCATION; + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public static Builder newBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static LocationBuilder newLocationBuilder() { + return new LocationBuilder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static PolicyName of(String project) { + return newBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static PolicyName ofProjectName(String project) { + return newBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static PolicyName ofLocationName(String location) { + return newLocationBuilder().setLocation(location).build(); + } + + public static String format(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectName(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatLocationName(String location) { + return newLocationBuilder().setLocation(location).build().toString(); + } + + public static PolicyName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + if (PROJECT.matches(formattedString)) { + Map matchMap = PROJECT.match(formattedString); + return ofProjectName(matchMap.get("project")); + } else if (LOCATION.matches(formattedString)) { + Map matchMap = LOCATION.match(formattedString); + return ofLocationName(matchMap.get("location")); + } + throw new ValidationException("PolicyName.parse: formattedString not in valid format"); + } + + 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 (PolicyName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT.matches(formattedString) || 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 fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + PolicyName that = ((PolicyName) 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(fixedValue); + h *= 1000003; + h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); + return h; + } + + /** Builder for projects/{project}/policy. */ + 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(PolicyName policyName) { + Preconditions.checkArgument( + Objects.equals(policyName.pathTemplate, PROJECT), + "toBuilder is only supported when PolicyName has the pattern of projects/{project}/policy"); + this.project = policyName.project; + } + + public PolicyName build() { + return new PolicyName(this); + } + } + + /** Builder for locations/{location}/policy. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class LocationBuilder { + private String location; + + protected LocationBuilder() {} + + public String getLocation() { + return location; + } + + public LocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public PolicyName build() { + return new PolicyName(this); + } + } +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java new file mode 100644 index 00000000..c9062d3a --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class 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) { + this.project = projectName.project; + } + + public ProjectName build() { + return new ProjectName(this); + } + } +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java new file mode 100644 index 00000000..57880167 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java @@ -0,0 +1,14548 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/binaryauthorization/v1/resources.proto + +package com.google.protos.google.cloud.binaryauthorization.v1; + +public final class Resources { + private Resources() {} + + 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 PolicyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.Policy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalPolicyEvaluationMode. + */ + int getGlobalPolicyEvaluationModeValue(); + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalPolicyEvaluationMode. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + getGlobalPolicyEvaluationMode(); + + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + getAdmissionWhitelistPatternsList(); + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + getAdmissionWhitelistPatterns(int index); + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getAdmissionWhitelistPatternsCount(); + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsOrBuilderList(); + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder + getAdmissionWhitelistPatternsOrBuilder(int index); + + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getClusterAdmissionRulesCount(); + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsClusterAdmissionRules(java.lang.String key); + /** Use {@link #getClusterAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRules(); + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRulesMap(); + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue); + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getKubernetesNamespaceAdmissionRulesCount(); + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key); + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRules(); + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRulesMap(); + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue); + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getKubernetesServiceAccountAdmissionRulesCount(); + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key); + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRules(); + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRulesMap(); + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue); + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getIstioServiceIdentityAdmissionRulesCount(); + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key); + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRules(); + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRulesMap(); + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue); + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultAdmissionRule field is set. + */ + boolean hasDefaultAdmissionRule(); + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultAdmissionRule. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultAdmissionRule(); + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder + getDefaultAdmissionRuleOrBuilder(); + + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + } + /** + * + * + *
+   * A [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.Policy} + */ + public static final class Policy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.Policy) + PolicyOrBuilder { + private static final long serialVersionUID = 0L; + // Use Policy.newBuilder() to construct. + private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Policy() { + name_ = ""; + description_ = ""; + globalPolicyEvaluationMode_ = 0; + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Policy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Policy( + 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)) { + admissionWhitelistPatterns_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern>(); + mutable_bitField0_ |= 0x00000001; + } + admissionWhitelistPatterns_.add( + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.parser(), + extensionRegistry)); + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + clusterAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000002; + } + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + clusterAdmissionRules__ = + input.readMessage( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + clusterAdmissionRules_ + .getMutableMap() + .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); + break; + } + case 34: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .Builder + subBuilder = null; + if (defaultAdmissionRule_ != null) { + subBuilder = defaultAdmissionRule_.toBuilder(); + } + defaultAdmissionRule_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultAdmissionRule_); + defaultAdmissionRule_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 56: + { + int rawValue = input.readEnum(); + + globalPolicyEvaluationMode_ = rawValue; + break; + } + case 66: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + kubernetesServiceAccountAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + input.readMessage( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + kubernetesServiceAccountAdmissionRules_ + .getMutableMap() + .put( + kubernetesServiceAccountAdmissionRules__.getKey(), + kubernetesServiceAccountAdmissionRules__.getValue()); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + istioServiceIdentityAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + istioServiceIdentityAdmissionRules__ = + input.readMessage( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + istioServiceIdentityAdmissionRules_ + .getMutableMap() + .put( + istioServiceIdentityAdmissionRules__.getKey(), + istioServiceIdentityAdmissionRules__.getValue()); + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + kubernetesNamespaceAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + input.readMessage( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + kubernetesNamespaceAdmissionRules_ + .getMutableMap() + .put( + kubernetesNamespaceAdmissionRules__.getKey(), + kubernetesNamespaceAdmissionRules__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + admissionWhitelistPatterns_ = + java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetClusterAdmissionRules(); + case 10: + return internalGetKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetIstioServiceIdentityAdmissionRules(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder.class); + } + + /** + * Protobuf enum {@code google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode} + */ + public enum GlobalPolicyEvaluationMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not specified: DISABLE is assumed.
+       * 
+ * + * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + */ + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED(0), + /** + * + * + *
+       * Enables system policy evaluation.
+       * 
+ * + * ENABLE = 1; + */ + ENABLE(1), + /** + * + * + *
+       * Disables system policy evaluation.
+       * 
+ * + * DISABLE = 2; + */ + DISABLE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not specified: DISABLE is assumed.
+       * 
+ * + * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + */ + public static final int GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Enables system policy evaluation.
+       * 
+ * + * ENABLE = 1; + */ + public static final int ENABLE_VALUE = 1; + /** + * + * + *
+       * Disables system policy evaluation.
+       * 
+ * + * DISABLE = 2; + */ + public static final int DISABLE_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 GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode forNumber(int value) { + switch (value) { + case 0: + return GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED; + case 1: + return ENABLE; + case 2: + return DISABLE; + 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 GlobalPolicyEvaluationMode findValueByNumber(int number) { + return GlobalPolicyEvaluationMode.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.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final GlobalPolicyEvaluationMode[] VALUES = values(); + + public static GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * 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 DESCRIPTION_FIELD_NUMBER = 6; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.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 GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER = 7; + private int globalPolicyEvaluationMode_; + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalPolicyEvaluationMode. + */ + @java.lang.Override + public int getGlobalPolicyEvaluationModeValue() { + return globalPolicyEvaluationMode_; + } + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalPolicyEvaluationMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + getGlobalPolicyEvaluationMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.valueOf(globalPolicyEvaluationMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.UNRECOGNIZED + : result; + } + + public static final int ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER = 2; + private java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + admissionWhitelistPatterns_; + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + getAdmissionWhitelistPatternsList() { + return admissionWhitelistPatterns_; + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsOrBuilderList() { + return admissionWhitelistPatterns_; + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getAdmissionWhitelistPatternsCount() { + return admissionWhitelistPatterns_.size(); + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + getAdmissionWhitelistPatterns(int index) { + return admissionWhitelistPatterns_.get(index); + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder + getAdmissionWhitelistPatternsOrBuilder(int index) { + return admissionWhitelistPatterns_.get(index); + } + + public static final int CLUSTER_ADMISSION_RULES_FIELD_NUMBER = 3; + + private static final class ClusterAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + clusterAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetClusterAdmissionRules() { + if (clusterAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return clusterAdmissionRules_; + } + + public int getClusterAdmissionRulesCount() { + return internalGetClusterAdmissionRules().getMap().size(); + } + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsClusterAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetClusterAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getClusterAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRules() { + return getClusterAdmissionRulesMap(); + } + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRulesMap() { + return internalGetClusterAdmissionRules().getMap(); + } + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetClusterAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetClusterAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER = 10; + + private static final class KubernetesNamespaceAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesNamespaceAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetKubernetesNamespaceAdmissionRules() { + if (kubernetesNamespaceAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesNamespaceAdmissionRules_; + } + + public int getKubernetesNamespaceAdmissionRulesCount() { + return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRules() { + return getKubernetesNamespaceAdmissionRulesMap(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRulesMap() { + return internalGetKubernetesNamespaceAdmissionRules().getMap(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     * [a-z.-]+, e.g. 'some-namespace'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER = 8; + + private static final class KubernetesServiceAccountAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesServiceAccountAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetKubernetesServiceAccountAdmissionRules() { + if (kubernetesServiceAccountAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesServiceAccountAdmissionRules_; + } + + public int getKubernetesServiceAccountAdmissionRulesCount() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRules() { + return getKubernetesServiceAccountAdmissionRulesMap(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRulesMap() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap(); + } + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER = 9; + + private static final class IstioServiceIdentityAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule.getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + istioServiceIdentityAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetIstioServiceIdentityAdmissionRules() { + if (istioServiceIdentityAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return istioServiceIdentityAdmissionRules_; + } + + public int getIstioServiceIdentityAdmissionRulesCount() { + return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); + } + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRules() { + return getIstioServiceIdentityAdmissionRulesMap(); + } + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRulesMap() { + return internalGetIstioServiceIdentityAdmissionRules().getMap(); + } + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+     * <domain>/ns/<namespace>/sa/<serviceaccount>
+     * e.g. spiffe://example.com/ns/test-ns/sa/default
+     * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DEFAULT_ADMISSION_RULE_FIELD_NUMBER = 4; + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultAdmissionRule_; + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultAdmissionRule field is set. + */ + @java.lang.Override + public boolean hasDefaultAdmissionRule() { + return defaultAdmissionRule_ != null; + } + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultAdmissionRule. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultAdmissionRule() { + return defaultAdmissionRule_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDefaultInstance() + : defaultAdmissionRule_; + } + /** + * + * + *
+     * Required. Default admission rule for a cluster without a per-cluster, per-
+     * kubernetes-service-account, or per-istio-service-identity admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder + getDefaultAdmissionRuleOrBuilder() { + return getDefaultAdmissionRule(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+     * Output only. Time when the policy was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.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 < admissionWhitelistPatterns_.size(); i++) { + output.writeMessage(2, admissionWhitelistPatterns_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetClusterAdmissionRules(), + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry, + 3); + if (defaultAdmissionRule_ != null) { + output.writeMessage(4, getDefaultAdmissionRule()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (globalPolicyEvaluationMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, globalPolicyEvaluationMode_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetKubernetesServiceAccountAdmissionRules(), + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry, + 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetIstioServiceIdentityAdmissionRules(), + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry, + 9); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetKubernetesNamespaceAdmissionRules(), + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, + 10); + 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 < admissionWhitelistPatterns_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, admissionWhitelistPatterns_.get(i)); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + entry : internalGetClusterAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + clusterAdmissionRules__ = + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(3, clusterAdmissionRules__); + } + if (defaultAdmissionRule_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDefaultAdmissionRule()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + if (globalPolicyEvaluationMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED + .getNumber()) { + size += + com.google.protobuf.CodedOutputStream.computeEnumSize(7, globalPolicyEvaluationMode_); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + entry : internalGetKubernetesServiceAccountAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, kubernetesServiceAccountAdmissionRules__); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + entry : internalGetIstioServiceIdentityAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + istioServiceIdentityAdmissionRules__ = + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, istioServiceIdentityAdmissionRules__); + } + for (java.util.Map.Entry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + entry : internalGetKubernetesNamespaceAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, kubernetesNamespaceAdmissionRules__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (globalPolicyEvaluationMode_ != other.globalPolicyEvaluationMode_) return false; + if (!getAdmissionWhitelistPatternsList().equals(other.getAdmissionWhitelistPatternsList())) + return false; + if (!internalGetClusterAdmissionRules().equals(other.internalGetClusterAdmissionRules())) + return false; + if (!internalGetKubernetesNamespaceAdmissionRules() + .equals(other.internalGetKubernetesNamespaceAdmissionRules())) return false; + if (!internalGetKubernetesServiceAccountAdmissionRules() + .equals(other.internalGetKubernetesServiceAccountAdmissionRules())) return false; + if (!internalGetIstioServiceIdentityAdmissionRules() + .equals(other.internalGetIstioServiceIdentityAdmissionRules())) return false; + if (hasDefaultAdmissionRule() != other.hasDefaultAdmissionRule()) return false; + if (hasDefaultAdmissionRule()) { + if (!getDefaultAdmissionRule().equals(other.getDefaultAdmissionRule())) 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(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + globalPolicyEvaluationMode_; + if (getAdmissionWhitelistPatternsCount() > 0) { + hash = (37 * hash) + ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER; + hash = (53 * hash) + getAdmissionWhitelistPatternsList().hashCode(); + } + if (!internalGetClusterAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + CLUSTER_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetClusterAdmissionRules().hashCode(); + } + if (!internalGetKubernetesNamespaceAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetKubernetesNamespaceAdmissionRules().hashCode(); + } + if (!internalGetKubernetesServiceAccountAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetKubernetesServiceAccountAdmissionRules().hashCode(); + } + if (!internalGetIstioServiceIdentityAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetIstioServiceIdentityAdmissionRules().hashCode(); + } + if (hasDefaultAdmissionRule()) { + hash = (37 * hash) + DEFAULT_ADMISSION_RULE_FIELD_NUMBER; + hash = (53 * hash) + getDefaultAdmissionRule().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.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.Policy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.Policy) + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 3: + return internalGetClusterAdmissionRules(); + case 10: + return internalGetKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetIstioServiceIdentityAdmissionRules(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 3: + return internalGetMutableClusterAdmissionRules(); + case 10: + return internalGetMutableKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetMutableKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetMutableIstioServiceIdentityAdmissionRules(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder + .class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAdmissionWhitelistPatternsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + description_ = ""; + + globalPolicyEvaluationMode_ = 0; + + if (admissionWhitelistPatternsBuilder_ == null) { + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + admissionWhitelistPatternsBuilder_.clear(); + } + internalGetMutableClusterAdmissionRules().clear(); + internalGetMutableKubernetesNamespaceAdmissionRules().clear(); + internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); + internalGetMutableIstioServiceIdentityAdmissionRules().clear(); + if (defaultAdmissionRuleBuilder_ == null) { + defaultAdmissionRule_ = null; + } else { + defaultAdmissionRule_ = null; + defaultAdmissionRuleBuilder_ = 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.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.description_ = description_; + result.globalPolicyEvaluationMode_ = globalPolicyEvaluationMode_; + if (admissionWhitelistPatternsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + admissionWhitelistPatterns_ = + java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.admissionWhitelistPatterns_ = admissionWhitelistPatterns_; + } else { + result.admissionWhitelistPatterns_ = admissionWhitelistPatternsBuilder_.build(); + } + result.clusterAdmissionRules_ = internalGetClusterAdmissionRules(); + result.clusterAdmissionRules_.makeImmutable(); + result.kubernetesNamespaceAdmissionRules_ = internalGetKubernetesNamespaceAdmissionRules(); + result.kubernetesNamespaceAdmissionRules_.makeImmutable(); + result.kubernetesServiceAccountAdmissionRules_ = + internalGetKubernetesServiceAccountAdmissionRules(); + result.kubernetesServiceAccountAdmissionRules_.makeImmutable(); + result.istioServiceIdentityAdmissionRules_ = + internalGetIstioServiceIdentityAdmissionRules(); + result.istioServiceIdentityAdmissionRules_.makeImmutable(); + if (defaultAdmissionRuleBuilder_ == null) { + result.defaultAdmissionRule_ = defaultAdmissionRule_; + } else { + result.defaultAdmissionRule_ = defaultAdmissionRuleBuilder_.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.protos.google.cloud.binaryauthorization.v1.Resources.Policy) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.globalPolicyEvaluationMode_ != 0) { + setGlobalPolicyEvaluationModeValue(other.getGlobalPolicyEvaluationModeValue()); + } + if (admissionWhitelistPatternsBuilder_ == null) { + if (!other.admissionWhitelistPatterns_.isEmpty()) { + if (admissionWhitelistPatterns_.isEmpty()) { + admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.addAll(other.admissionWhitelistPatterns_); + } + onChanged(); + } + } else { + if (!other.admissionWhitelistPatterns_.isEmpty()) { + if (admissionWhitelistPatternsBuilder_.isEmpty()) { + admissionWhitelistPatternsBuilder_.dispose(); + admissionWhitelistPatternsBuilder_ = null; + admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; + bitField0_ = (bitField0_ & ~0x00000001); + admissionWhitelistPatternsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAdmissionWhitelistPatternsFieldBuilder() + : null; + } else { + admissionWhitelistPatternsBuilder_.addAllMessages(other.admissionWhitelistPatterns_); + } + } + } + internalGetMutableClusterAdmissionRules() + .mergeFrom(other.internalGetClusterAdmissionRules()); + internalGetMutableKubernetesNamespaceAdmissionRules() + .mergeFrom(other.internalGetKubernetesNamespaceAdmissionRules()); + internalGetMutableKubernetesServiceAccountAdmissionRules() + .mergeFrom(other.internalGetKubernetesServiceAccountAdmissionRules()); + internalGetMutableIstioServiceIdentityAdmissionRules() + .mergeFrom(other.internalGetIstioServiceIdentityAdmissionRules()); + if (other.hasDefaultAdmissionRule()) { + mergeDefaultAdmissionRule(other.getDefaultAdmissionRule()); + } + 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.protos.google.cloud.binaryauthorization.v1.Resources.Policy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Output only. The resource name, in the format `projects/*/policy`. There is
+       * at most one policy per project.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. The resource name, in the format `projects/*/policy`. There is
+       * at most one policy per project.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. The resource name, in the format `projects/*/policy`. There is
+       * at most one policy per project.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name, in the format `projects/*/policy`. There is
+       * at most one policy per project.
+       * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. The resource name, in the format `projects/*/policy`. There is
+       * at most one policy per project.
+       * 
+ * + * 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 description_ = ""; + /** + * + * + *
+       * Optional. A descriptive comment.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment.
+       * 
+ * + * string description = 6 [(.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 int globalPolicyEvaluationMode_ = 0; + /** + * + * + *
+       * Optional. Controls the evaluation of a Google-maintained global admission
+       * policy for common system-level images. Images not covered by the global
+       * policy will be subject to the project admission policy. This setting
+       * has no effect when specified inside a global admission policy.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalPolicyEvaluationMode. + */ + @java.lang.Override + public int getGlobalPolicyEvaluationModeValue() { + return globalPolicyEvaluationMode_; + } + /** + * + * + *
+       * Optional. Controls the evaluation of a Google-maintained global admission
+       * policy for common system-level images. Images not covered by the global
+       * policy will be subject to the project admission policy. This setting
+       * has no effect when specified inside a global admission policy.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for globalPolicyEvaluationMode to set. + * @return This builder for chaining. + */ + public Builder setGlobalPolicyEvaluationModeValue(int value) { + + globalPolicyEvaluationMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Controls the evaluation of a Google-maintained global admission
+       * policy for common system-level images. Images not covered by the global
+       * policy will be subject to the project admission policy. This setting
+       * has no effect when specified inside a global admission policy.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalPolicyEvaluationMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + getGlobalPolicyEvaluationMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.valueOf(globalPolicyEvaluationMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Optional. Controls the evaluation of a Google-maintained global admission
+       * policy for common system-level images. Images not covered by the global
+       * policy will be subject to the project admission policy. This setting
+       * has no effect when specified inside a global admission policy.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The globalPolicyEvaluationMode to set. + * @return This builder for chaining. + */ + public Builder setGlobalPolicyEvaluationMode( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .GlobalPolicyEvaluationMode + value) { + if (value == null) { + throw new NullPointerException(); + } + + globalPolicyEvaluationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Controls the evaluation of a Google-maintained global admission
+       * policy for common system-level images. Images not covered by the global
+       * policy will be subject to the project admission policy. This setting
+       * has no effect when specified inside a global admission policy.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGlobalPolicyEvaluationMode() { + + globalPolicyEvaluationMode_ = 0; + onChanged(); + return this; + } + + private java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + + private void ensureAdmissionWhitelistPatternsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + admissionWhitelistPatterns_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern>(admissionWhitelistPatterns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder> + admissionWhitelistPatternsBuilder_; + + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + getAdmissionWhitelistPatternsList() { + if (admissionWhitelistPatternsBuilder_ == null) { + return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + } else { + return admissionWhitelistPatternsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAdmissionWhitelistPatternsCount() { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.size(); + } else { + return admissionWhitelistPatternsBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + getAdmissionWhitelistPatterns(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.get(index); + } else { + return admissionWhitelistPatternsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdmissionWhitelistPatterns( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.set(index, value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdmissionWhitelistPatterns( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + .Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.set(index, builderForValue.build()); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(index, value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + .Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(builderForValue.build()); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + .Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(index, builderForValue.build()); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllAdmissionWhitelistPatterns( + java.lang.Iterable< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern> + values) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, admissionWhitelistPatterns_); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearAdmissionWhitelistPatterns() { + if (admissionWhitelistPatternsBuilder_ == null) { + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeAdmissionWhitelistPatterns(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.remove(index); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder + getAdmissionWhitelistPatternsBuilder(int index) { + return getAdmissionWhitelistPatternsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder + getAdmissionWhitelistPatternsOrBuilder(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.get(index); + } else { + return admissionWhitelistPatternsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsOrBuilderList() { + if (admissionWhitelistPatternsBuilder_ != null) { + return admissionWhitelistPatternsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + } + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder + addAdmissionWhitelistPatternsBuilder() { + return getAdmissionWhitelistPatternsFieldBuilder() + .addBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder + addAdmissionWhitelistPatternsBuilder(int index) { + return getAdmissionWhitelistPatternsFieldBuilder() + .addBuilder( + index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Admission policy allowlisting. A matching admission request will
+       * always be permitted. This feature is typically used to exclude Google or
+       * third-party infrastructure images from Binary Authorization policies.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder> + getAdmissionWhitelistPatternsBuilderList() { + return getAdmissionWhitelistPatternsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsFieldBuilder() { + if (admissionWhitelistPatternsBuilder_ == null) { + admissionWhitelistPatternsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder>( + admissionWhitelistPatterns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + admissionWhitelistPatterns_ = null; + } + return admissionWhitelistPatternsBuilder_; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + clusterAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetClusterAdmissionRules() { + if (clusterAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return clusterAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetMutableClusterAdmissionRules() { + onChanged(); + ; + if (clusterAdmissionRules_ == null) { + clusterAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!clusterAdmissionRules_.isMutable()) { + clusterAdmissionRules_ = clusterAdmissionRules_.copy(); + } + return clusterAdmissionRules_; + } + + public int getClusterAdmissionRulesCount() { + return internalGetClusterAdmissionRules().getMap().size(); + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsClusterAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetClusterAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getClusterAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRules() { + return getClusterAdmissionRulesMap(); + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getClusterAdmissionRulesMap() { + return internalGetClusterAdmissionRules().getMap(); + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetClusterAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getClusterAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetClusterAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearClusterAdmissionRules() { + internalGetMutableClusterAdmissionRules().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeClusterAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getMutableClusterAdmissionRules() { + return internalGetMutableClusterAdmissionRules().getMutableMap(); + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putClusterAdmissionRules( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * Optional. Per-cluster admission rules. Cluster spec format:
+       * `location.clusterId`. There can be at most one admission rule per cluster
+       * spec.
+       * A `location` is either a compute zone (e.g. us-central1-a) or a region
+       * (e.g. us-central1).
+       * For `clusterId` syntax restrictions see
+       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllClusterAdmissionRules( + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + values) { + internalGetMutableClusterAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesNamespaceAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetKubernetesNamespaceAdmissionRules() { + if (kubernetesNamespaceAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesNamespaceAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetMutableKubernetesNamespaceAdmissionRules() { + onChanged(); + ; + if (kubernetesNamespaceAdmissionRules_ == null) { + kubernetesNamespaceAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!kubernetesNamespaceAdmissionRules_.isMutable()) { + kubernetesNamespaceAdmissionRules_ = kubernetesNamespaceAdmissionRules_.copy(); + } + return kubernetesNamespaceAdmissionRules_; + } + + public int getKubernetesNamespaceAdmissionRulesCount() { + return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRules() { + return getKubernetesNamespaceAdmissionRulesMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesNamespaceAdmissionRulesMap() { + return internalGetKubernetesNamespaceAdmissionRules().getMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearKubernetesNamespaceAdmissionRules() { + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getMutableKubernetesNamespaceAdmissionRules() { + return internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putKubernetesNamespaceAdmissionRules( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+       * [a-z.-]+, e.g. 'some-namespace'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllKubernetesNamespaceAdmissionRules( + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + values) { + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + kubernetesServiceAccountAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetKubernetesServiceAccountAdmissionRules() { + if (kubernetesServiceAccountAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesServiceAccountAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetMutableKubernetesServiceAccountAdmissionRules() { + onChanged(); + ; + if (kubernetesServiceAccountAdmissionRules_ == null) { + kubernetesServiceAccountAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!kubernetesServiceAccountAdmissionRules_.isMutable()) { + kubernetesServiceAccountAdmissionRules_ = kubernetesServiceAccountAdmissionRules_.copy(); + } + return kubernetesServiceAccountAdmissionRules_; + } + + public int getKubernetesServiceAccountAdmissionRulesCount() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRules() { + return getKubernetesServiceAccountAdmissionRulesMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getKubernetesServiceAccountAdmissionRulesMap() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearKubernetesServiceAccountAdmissionRules() { + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getMutableKubernetesServiceAccountAdmissionRules() { + return internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap(); + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putKubernetesServiceAccountAdmissionRules( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * Optional. Per-kubernetes-service-account admission rules. Service account
+       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllKubernetesServiceAccountAdmissionRules( + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + values) { + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + istioServiceIdentityAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetIstioServiceIdentityAdmissionRules() { + if (istioServiceIdentityAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return istioServiceIdentityAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + internalGetMutableIstioServiceIdentityAdmissionRules() { + onChanged(); + ; + if (istioServiceIdentityAdmissionRules_ == null) { + istioServiceIdentityAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!istioServiceIdentityAdmissionRules_.isMutable()) { + istioServiceIdentityAdmissionRules_ = istioServiceIdentityAdmissionRules_.copy(); + } + return istioServiceIdentityAdmissionRules_; + } + + public int getIstioServiceIdentityAdmissionRulesCount() { + return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRules() { + return getIstioServiceIdentityAdmissionRulesMap(); + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getIstioServiceIdentityAdmissionRulesMap() { + return internalGetIstioServiceIdentityAdmissionRules().getMap(); + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrDefault( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearIstioServiceIdentityAdmissionRules() { + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + getMutableIstioServiceIdentityAdmissionRules() { + return internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap(); + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putIstioServiceIdentityAdmissionRules( + java.lang.String key, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * Optional. Per-istio-service-identity admission rules. Istio service
+       * identity spec format:
+       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
+       * <domain>/ns/<namespace>/sa/<serviceaccount>
+       * e.g. spiffe://example.com/ns/test-ns/sa/default
+       * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder putAllIstioServiceIdentityAdmissionRules( + java.util.Map< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> + values) { + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + defaultAdmissionRule_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRuleOrBuilder> + defaultAdmissionRuleBuilder_; + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultAdmissionRule field is set. + */ + public boolean hasDefaultAdmissionRule() { + return defaultAdmissionRuleBuilder_ != null || defaultAdmissionRule_ != null; + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultAdmissionRule. + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultAdmissionRule() { + if (defaultAdmissionRuleBuilder_ == null) { + return defaultAdmissionRule_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDefaultInstance() + : defaultAdmissionRule_; + } else { + return defaultAdmissionRuleBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDefaultAdmissionRule( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (defaultAdmissionRuleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultAdmissionRule_ = value; + onChanged(); + } else { + defaultAdmissionRuleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setDefaultAdmissionRule( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder + builderForValue) { + if (defaultAdmissionRuleBuilder_ == null) { + defaultAdmissionRule_ = builderForValue.build(); + onChanged(); + } else { + defaultAdmissionRuleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeDefaultAdmissionRule( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { + if (defaultAdmissionRuleBuilder_ == null) { + if (defaultAdmissionRule_ != null) { + defaultAdmissionRule_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .newBuilder(defaultAdmissionRule_) + .mergeFrom(value) + .buildPartial(); + } else { + defaultAdmissionRule_ = value; + } + onChanged(); + } else { + defaultAdmissionRuleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearDefaultAdmissionRule() { + if (defaultAdmissionRuleBuilder_ == null) { + defaultAdmissionRule_ = null; + onChanged(); + } else { + defaultAdmissionRule_ = null; + defaultAdmissionRuleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder + getDefaultAdmissionRuleBuilder() { + + onChanged(); + return getDefaultAdmissionRuleFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder + getDefaultAdmissionRuleOrBuilder() { + if (defaultAdmissionRuleBuilder_ != null) { + return defaultAdmissionRuleBuilder_.getMessageOrBuilder(); + } else { + return defaultAdmissionRule_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDefaultInstance() + : defaultAdmissionRule_; + } + } + /** + * + * + *
+       * Required. Default admission rule for a cluster without a per-cluster, per-
+       * kubernetes-service-account, or per-istio-service-identity admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRuleOrBuilder> + getDefaultAdmissionRuleFieldBuilder() { + if (defaultAdmissionRuleBuilder_ == null) { + defaultAdmissionRuleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRuleOrBuilder>( + getDefaultAdmissionRule(), getParentForChildren(), isClean()); + defaultAdmissionRule_ = null; + } + return defaultAdmissionRuleBuilder_; + } + + 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 when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_) + .mergeFrom(value) + .buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+       * Output only. Time when the policy was last updated.
+       * 
+ * + * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.Policy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.Policy) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Policy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Policy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AdmissionWhitelistPatternOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
+     * This supports a trailing `*` wildcard, but this is allowed only in
+     * text after the `registry/` part. This also supports a trailing `**`
+     * wildcard which matches subdirectories of a given entry.
+     * 
+ * + * string name_pattern = 1; + * + * @return The namePattern. + */ + java.lang.String getNamePattern(); + /** + * + * + *
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
+     * This supports a trailing `*` wildcard, but this is allowed only in
+     * text after the `registry/` part. This also supports a trailing `**`
+     * wildcard which matches subdirectories of a given entry.
+     * 
+ * + * string name_pattern = 1; + * + * @return The bytes for namePattern. + */ + com.google.protobuf.ByteString getNamePatternBytes(); + } + /** + * + * + *
+   * An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images
+   * from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern} + */ + public static final class AdmissionWhitelistPattern extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) + AdmissionWhitelistPatternOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdmissionWhitelistPattern.newBuilder() to construct. + private AdmissionWhitelistPattern(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdmissionWhitelistPattern() { + namePattern_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdmissionWhitelistPattern(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AdmissionWhitelistPattern( + 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(); + + namePattern_ = 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.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder.class); + } + + public static final int NAME_PATTERN_FIELD_NUMBER = 1; + private volatile java.lang.Object namePattern_; + /** + * + * + *
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
+     * This supports a trailing `*` wildcard, but this is allowed only in
+     * text after the `registry/` part. This also supports a trailing `**`
+     * wildcard which matches subdirectories of a given entry.
+     * 
+ * + * string name_pattern = 1; + * + * @return The namePattern. + */ + @java.lang.Override + public java.lang.String getNamePattern() { + java.lang.Object ref = namePattern_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namePattern_ = s; + return s; + } + } + /** + * + * + *
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
+     * This supports a trailing `*` wildcard, but this is allowed only in
+     * text after the `registry/` part. This also supports a trailing `**`
+     * wildcard which matches subdirectories of a given entry.
+     * 
+ * + * string name_pattern = 1; + * + * @return The bytes for namePattern. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNamePatternBytes() { + java.lang.Object ref = namePattern_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namePattern_ = 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 (!getNamePatternBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNamePatternBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern) + obj; + + if (!getNamePattern().equals(other.getNamePattern())) return false; + if (!unknownFields.equals(other.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_PATTERN_FIELD_NUMBER; + hash = (53 * hash) + getNamePattern().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images
+     * from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPatternOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + namePattern_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern(this); + result.namePattern_ = namePattern_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.getDefaultInstance()) return this; + if (!other.getNamePattern().isEmpty()) { + namePattern_ = other.namePattern_; + 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.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object namePattern_ = ""; + /** + * + * + *
+       * An image name pattern to allowlist, in the form `registry/path/to/image`.
+       * This supports a trailing `*` wildcard, but this is allowed only in
+       * text after the `registry/` part. This also supports a trailing `**`
+       * wildcard which matches subdirectories of a given entry.
+       * 
+ * + * string name_pattern = 1; + * + * @return The namePattern. + */ + public java.lang.String getNamePattern() { + java.lang.Object ref = namePattern_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + namePattern_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * An image name pattern to allowlist, in the form `registry/path/to/image`.
+       * This supports a trailing `*` wildcard, but this is allowed only in
+       * text after the `registry/` part. This also supports a trailing `**`
+       * wildcard which matches subdirectories of a given entry.
+       * 
+ * + * string name_pattern = 1; + * + * @return The bytes for namePattern. + */ + public com.google.protobuf.ByteString getNamePatternBytes() { + java.lang.Object ref = namePattern_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + namePattern_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * An image name pattern to allowlist, in the form `registry/path/to/image`.
+       * This supports a trailing `*` wildcard, but this is allowed only in
+       * text after the `registry/` part. This also supports a trailing `**`
+       * wildcard which matches subdirectories of a given entry.
+       * 
+ * + * string name_pattern = 1; + * + * @param value The namePattern to set. + * @return This builder for chaining. + */ + public Builder setNamePattern(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + namePattern_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * An image name pattern to allowlist, in the form `registry/path/to/image`.
+       * This supports a trailing `*` wildcard, but this is allowed only in
+       * text after the `registry/` part. This also supports a trailing `**`
+       * wildcard which matches subdirectories of a given entry.
+       * 
+ * + * string name_pattern = 1; + * + * @return This builder for chaining. + */ + public Builder clearNamePattern() { + + namePattern_ = getDefaultInstance().getNamePattern(); + onChanged(); + return this; + } + /** + * + * + *
+       * An image name pattern to allowlist, in the form `registry/path/to/image`.
+       * This supports a trailing `*` wildcard, but this is allowed only in
+       * text after the `registry/` part. This also supports a trailing `**`
+       * wildcard which matches subdirectories of a given entry.
+       * 
+ * + * string name_pattern = 1; + * + * @param value The bytes for namePattern to set. + * @return This builder for chaining. + */ + public Builder setNamePatternBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + namePattern_ = 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.binaryauthorization.v1.AdmissionWhitelistPattern) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdmissionWhitelistPattern parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AdmissionWhitelistPattern(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AdmissionRuleOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AdmissionRule) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. How this admission rule will be evaluated.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for evaluationMode. + */ + int getEvaluationModeValue(); + /** + * + * + *
+     * Required. How this admission rule will be evaluated.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The evaluationMode. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode + getEvaluationMode(); + + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the requireAttestationsBy. + */ + java.util.List getRequireAttestationsByList(); + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of requireAttestationsBy. + */ + int getRequireAttestationsByCount(); + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The requireAttestationsBy at the given index. + */ + java.lang.String getRequireAttestationsBy(int index); + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the requireAttestationsBy at the given index. + */ + com.google.protobuf.ByteString getRequireAttestationsByBytes(int index); + + /** + * + * + *
+     * Required. The action when a pod creation is denied by the admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for enforcementMode. + */ + int getEnforcementModeValue(); + /** + * + * + *
+     * Required. The action when a pod creation is denied by the admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enforcementMode. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EnforcementMode + getEnforcementMode(); + } + /** + * + * + *
+   * An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images
+   * used in a pod creation request must be attested to by one or more
+   * [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all
+   * pod creations will be denied.
+   * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern]
+   * are exempted from admission rules and will never block a pod creation.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionRule} + */ + public static final class AdmissionRule extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AdmissionRule) + AdmissionRuleOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdmissionRule.newBuilder() to construct. + private AdmissionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdmissionRule() { + evaluationMode_ = 0; + requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; + enforcementMode_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdmissionRule(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AdmissionRule( + 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(); + + evaluationMode_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + requireAttestationsBy_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + requireAttestationsBy_.add(s); + break; + } + case 24: + { + int rawValue = input.readEnum(); + + enforcementMode_ = 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)) { + requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder + .class); + } + + /** Protobuf enum {@code google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode} */ + public enum EvaluationMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Do not use.
+       * 
+ * + * EVALUATION_MODE_UNSPECIFIED = 0; + */ + EVALUATION_MODE_UNSPECIFIED(0), + /** + * + * + *
+       * This rule allows all all pod creations.
+       * 
+ * + * ALWAYS_ALLOW = 1; + */ + ALWAYS_ALLOW(1), + /** + * + * + *
+       * This rule allows a pod creation if all the attestors listed in
+       * 'require_attestations_by' have valid attestations for all of the
+       * images in the pod spec.
+       * 
+ * + * REQUIRE_ATTESTATION = 2; + */ + REQUIRE_ATTESTATION(2), + /** + * + * + *
+       * This rule denies all pod creations.
+       * 
+ * + * ALWAYS_DENY = 3; + */ + ALWAYS_DENY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Do not use.
+       * 
+ * + * EVALUATION_MODE_UNSPECIFIED = 0; + */ + public static final int EVALUATION_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * This rule allows all all pod creations.
+       * 
+ * + * ALWAYS_ALLOW = 1; + */ + public static final int ALWAYS_ALLOW_VALUE = 1; + /** + * + * + *
+       * This rule allows a pod creation if all the attestors listed in
+       * 'require_attestations_by' have valid attestations for all of the
+       * images in the pod spec.
+       * 
+ * + * REQUIRE_ATTESTATION = 2; + */ + public static final int REQUIRE_ATTESTATION_VALUE = 2; + /** + * + * + *
+       * This rule denies all pod creations.
+       * 
+ * + * ALWAYS_DENY = 3; + */ + public static final int ALWAYS_DENY_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 EvaluationMode 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 EvaluationMode forNumber(int value) { + switch (value) { + case 0: + return EVALUATION_MODE_UNSPECIFIED; + case 1: + return ALWAYS_ALLOW; + case 2: + return REQUIRE_ATTESTATION; + case 3: + return ALWAYS_DENY; + 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 EvaluationMode findValueByNumber(int number) { + return EvaluationMode.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.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final EvaluationMode[] VALUES = values(); + + public static EvaluationMode 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 EvaluationMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode) + } + + /** + * + * + *
+     * Defines the possible actions when a pod creation is denied by an admission
+     * rule.
+     * 
+ * + * Protobuf enum {@code google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode} + */ + public enum EnforcementMode implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Do not use.
+       * 
+ * + * ENFORCEMENT_MODE_UNSPECIFIED = 0; + */ + ENFORCEMENT_MODE_UNSPECIFIED(0), + /** + * + * + *
+       * Enforce the admission rule by blocking the pod creation.
+       * 
+ * + * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + */ + ENFORCED_BLOCK_AND_AUDIT_LOG(1), + /** + * + * + *
+       * Dryrun mode: Audit logging only.  This will allow the pod creation as if
+       * the admission request had specified break-glass.
+       * 
+ * + * DRYRUN_AUDIT_LOG_ONLY = 2; + */ + DRYRUN_AUDIT_LOG_ONLY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Do not use.
+       * 
+ * + * ENFORCEMENT_MODE_UNSPECIFIED = 0; + */ + public static final int ENFORCEMENT_MODE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * Enforce the admission rule by blocking the pod creation.
+       * 
+ * + * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + */ + public static final int ENFORCED_BLOCK_AND_AUDIT_LOG_VALUE = 1; + /** + * + * + *
+       * Dryrun mode: Audit logging only.  This will allow the pod creation as if
+       * the admission request had specified break-glass.
+       * 
+ * + * DRYRUN_AUDIT_LOG_ONLY = 2; + */ + public static final int DRYRUN_AUDIT_LOG_ONLY_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 EnforcementMode 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 EnforcementMode forNumber(int value) { + switch (value) { + case 0: + return ENFORCEMENT_MODE_UNSPECIFIED; + case 1: + return ENFORCED_BLOCK_AND_AUDIT_LOG; + case 2: + return DRYRUN_AUDIT_LOG_ONLY; + 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 EnforcementMode findValueByNumber(int number) { + return EnforcementMode.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.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final EnforcementMode[] VALUES = values(); + + public static EnforcementMode 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 EnforcementMode(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode) + } + + public static final int EVALUATION_MODE_FIELD_NUMBER = 1; + private int evaluationMode_; + /** + * + * + *
+     * Required. How this admission rule will be evaluated.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for evaluationMode. + */ + @java.lang.Override + public int getEvaluationModeValue() { + return evaluationMode_; + } + /** + * + * + *
+     * Required. How this admission rule will be evaluated.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The evaluationMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode + getEvaluationMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.valueOf(evaluationMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.UNRECOGNIZED + : result; + } + + public static final int REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList requireAttestationsBy_; + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the requireAttestationsBy. + */ + public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { + return requireAttestationsBy_; + } + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of requireAttestationsBy. + */ + public int getRequireAttestationsByCount() { + return requireAttestationsBy_.size(); + } + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The requireAttestationsBy at the given index. + */ + public java.lang.String getRequireAttestationsBy(int index) { + return requireAttestationsBy_.get(index); + } + /** + * + * + *
+     * Optional. The resource names of the attestors that must attest to
+     * a container image, in the format `projects/*/attestors/*`. Each
+     * attestor must exist before a policy can reference it.  To add an attestor
+     * to a policy the principal issuing the policy change request must be able
+     * to read the attestor resource.
+     * Note: this field must be non-empty when the evaluation_mode field specifies
+     * REQUIRE_ATTESTATION, otherwise it must be empty.
+     * 
+ * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the requireAttestationsBy at the given index. + */ + public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { + return requireAttestationsBy_.getByteString(index); + } + + public static final int ENFORCEMENT_MODE_FIELD_NUMBER = 3; + private int enforcementMode_; + /** + * + * + *
+     * Required. The action when a pod creation is denied by the admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for enforcementMode. + */ + @java.lang.Override + public int getEnforcementModeValue() { + return enforcementMode_; + } + /** + * + * + *
+     * Required. The action when a pod creation is denied by the admission rule.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enforcementMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode + getEnforcementMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EnforcementMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.valueOf(enforcementMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.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 (evaluationMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.EVALUATION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, evaluationMode_); + } + for (int i = 0; i < requireAttestationsBy_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, requireAttestationsBy_.getRaw(i)); + } + if (enforcementMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.ENFORCEMENT_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, enforcementMode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (evaluationMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.EVALUATION_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, evaluationMode_); + } + { + int dataSize = 0; + for (int i = 0; i < requireAttestationsBy_.size(); i++) { + dataSize += computeStringSizeNoTag(requireAttestationsBy_.getRaw(i)); + } + size += dataSize; + size += 1 * getRequireAttestationsByList().size(); + } + if (enforcementMode_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.ENFORCEMENT_MODE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, enforcementMode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) obj; + + if (evaluationMode_ != other.evaluationMode_) return false; + if (!getRequireAttestationsByList().equals(other.getRequireAttestationsByList())) + return false; + if (enforcementMode_ != other.enforcementMode_) return false; + if (!unknownFields.equals(other.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) + EVALUATION_MODE_FIELD_NUMBER; + hash = (53 * hash) + evaluationMode_; + if (getRequireAttestationsByCount() > 0) { + hash = (37 * hash) + REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER; + hash = (53 * hash) + getRequireAttestationsByList().hashCode(); + } + hash = (37 * hash) + ENFORCEMENT_MODE_FIELD_NUMBER; + hash = (53 * hash) + enforcementMode_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images
+     * used in a pod creation request must be attested to by one or more
+     * [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all
+     * pod creations will be denied.
+     * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern]
+     * are exempted from admission rules and will never block a pod creation.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionRule} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AdmissionRule) + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + evaluationMode_ = 0; + + requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + enforcementMode_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule(this); + int from_bitField0_ = bitField0_; + result.evaluationMode_ = evaluationMode_; + if (((bitField0_ & 0x00000001) != 0)) { + requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.requireAttestationsBy_ = requireAttestationsBy_; + result.enforcementMode_ = enforcementMode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .getDefaultInstance()) return this; + if (other.evaluationMode_ != 0) { + setEvaluationModeValue(other.getEvaluationModeValue()); + } + if (!other.requireAttestationsBy_.isEmpty()) { + if (requireAttestationsBy_.isEmpty()) { + requireAttestationsBy_ = other.requireAttestationsBy_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.addAll(other.requireAttestationsBy_); + } + onChanged(); + } + if (other.enforcementMode_ != 0) { + setEnforcementModeValue(other.getEnforcementModeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int evaluationMode_ = 0; + /** + * + * + *
+       * Required. How this admission rule will be evaluated.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for evaluationMode. + */ + @java.lang.Override + public int getEvaluationModeValue() { + return evaluationMode_; + } + /** + * + * + *
+       * Required. How this admission rule will be evaluated.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for evaluationMode to set. + * @return This builder for chaining. + */ + public Builder setEvaluationModeValue(int value) { + + evaluationMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. How this admission rule will be evaluated.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The evaluationMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode + getEvaluationMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.valueOf(evaluationMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. How this admission rule will be evaluated.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The evaluationMode to set. + * @return This builder for chaining. + */ + public Builder setEvaluationMode( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EvaluationMode + value) { + if (value == null) { + throw new NullPointerException(); + } + + evaluationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. How this admission rule will be evaluated.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEvaluationMode() { + + evaluationMode_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList requireAttestationsBy_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureRequireAttestationsByIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + requireAttestationsBy_ = + new com.google.protobuf.LazyStringArrayList(requireAttestationsBy_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the requireAttestationsBy. + */ + public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { + return requireAttestationsBy_.getUnmodifiableView(); + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of requireAttestationsBy. + */ + public int getRequireAttestationsByCount() { + return requireAttestationsBy_.size(); + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The requireAttestationsBy at the given index. + */ + public java.lang.String getRequireAttestationsBy(int index) { + return requireAttestationsBy_.get(index); + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the requireAttestationsBy at the given index. + */ + public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { + return requireAttestationsBy_.getByteString(index); + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The requireAttestationsBy to set. + * @return This builder for chaining. + */ + public Builder setRequireAttestationsBy(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The requireAttestationsBy to add. + * @return This builder for chaining. + */ + public Builder addRequireAttestationsBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The requireAttestationsBy to add. + * @return This builder for chaining. + */ + public Builder addAllRequireAttestationsBy(java.lang.Iterable values) { + ensureRequireAttestationsByIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requireAttestationsBy_); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearRequireAttestationsBy() { + requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. The resource names of the attestors that must attest to
+       * a container image, in the format `projects/*/attestors/*`. Each
+       * attestor must exist before a policy can reference it.  To add an attestor
+       * to a policy the principal issuing the policy change request must be able
+       * to read the attestor resource.
+       * Note: this field must be non-empty when the evaluation_mode field specifies
+       * REQUIRE_ATTESTATION, otherwise it must be empty.
+       * 
+ * + * + * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the requireAttestationsBy to add. + * @return This builder for chaining. + */ + public Builder addRequireAttestationsByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.add(value); + onChanged(); + return this; + } + + private int enforcementMode_ = 0; + /** + * + * + *
+       * Required. The action when a pod creation is denied by the admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for enforcementMode. + */ + @java.lang.Override + public int getEnforcementModeValue() { + return enforcementMode_; + } + /** + * + * + *
+       * Required. The action when a pod creation is denied by the admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for enforcementMode to set. + * @return This builder for chaining. + */ + public Builder setEnforcementModeValue(int value) { + + enforcementMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The action when a pod creation is denied by the admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enforcementMode. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode + getEnforcementMode() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.valueOf(enforcementMode_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. The action when a pod creation is denied by the admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enforcementMode to set. + * @return This builder for chaining. + */ + public Builder setEnforcementMode( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + .EnforcementMode + value) { + if (value == null) { + throw new NullPointerException(); + } + + enforcementMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The action when a pod creation is denied by the admission rule.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearEnforcementMode() { + + enforcementMode_ = 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.binaryauthorization.v1.AdmissionRule) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AdmissionRule) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdmissionRule parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AdmissionRule(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttestorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.Attestor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name, in the format:
+     * `projects/*/attestors/*`. This field may not be updated.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name, in the format:
+     * `projects/*/attestors/*`. This field may not be updated.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+     * Optional. A descriptive comment.  This field may be updated.
+     * The field may be displayed in chooser dialogs.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * Optional. A descriptive comment.  This field may be updated.
+     * The field may be displayed in chooser dialogs.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return Whether the userOwnedGrafeasNote field is set. + */ + boolean hasUserOwnedGrafeasNote(); + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return The userOwnedGrafeasNote. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + getUserOwnedGrafeasNote(); + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNoteOrBuilder + getUserOwnedGrafeasNoteOrBuilder(); + + /** + * + * + *
+     * Output only. Time when the attestor was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+     * Output only. Time when the attestor was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+     * Output only. Time when the attestor was last updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.AttestorTypeCase + getAttestorTypeCase(); + } + /** + * + * + *
+   * An [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image
+   * artifacts. An existing attestor cannot be modified except where
+   * indicated.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.Attestor} + */ + public static final class Attestor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.Attestor) + AttestorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Attestor.newBuilder() to construct. + private Attestor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Attestor() { + name_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Attestor(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Attestor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder + subBuilder = null; + if (attestorTypeCase_ == 3) { + subBuilder = + ((com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_) + .toBuilder(); + } + attestorType_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_); + attestorType_ = subBuilder.buildPartial(); + } + attestorTypeCase_ = 3; + 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: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = 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.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + .class); + } + + private int attestorTypeCase_ = 0; + private java.lang.Object attestorType_; + + public enum AttestorTypeCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + USER_OWNED_GRAFEAS_NOTE(3), + ATTESTORTYPE_NOT_SET(0); + private final int value; + + private AttestorTypeCase(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 AttestorTypeCase valueOf(int value) { + return forNumber(value); + } + + public static AttestorTypeCase forNumber(int value) { + switch (value) { + case 3: + return USER_OWNED_GRAFEAS_NOTE; + case 0: + return ATTESTORTYPE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public AttestorTypeCase getAttestorTypeCase() { + return AttestorTypeCase.forNumber(attestorTypeCase_); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name, in the format:
+     * `projects/*/attestors/*`. This field may not be updated.
+     * 
+ * + * 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, in the format:
+     * `projects/*/attestors/*`. This field may not be updated.
+     * 
+ * + * 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 = 6; + private volatile java.lang.Object description_; + /** + * + * + *
+     * Optional. A descriptive comment.  This field may be updated.
+     * The field may be displayed in chooser dialogs.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + @java.lang.Override + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. A descriptive comment.  This field may be updated.
+     * The field may be displayed in chooser dialogs.
+     * 
+ * + * string description = 6 [(.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 USER_OWNED_GRAFEAS_NOTE_FIELD_NUMBER = 3; + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return Whether the userOwnedGrafeasNote field is set. + */ + @java.lang.Override + public boolean hasUserOwnedGrafeasNote() { + return attestorTypeCase_ == 3; + } + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return The userOwnedGrafeasNote. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + getUserOwnedGrafeasNote() { + if (attestorTypeCase_ == 3) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .getDefaultInstance(); + } + /** + * + * + *
+     * This specifies how an attestation will be read, and how it will be used
+     * during policy enforcement.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder + getUserOwnedGrafeasNoteOrBuilder() { + if (attestorTypeCase_ == 3) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .getDefaultInstance(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+     * Output only. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last updated.
+     * 
+ * + * + * .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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (attestorTypeCase_ == 3) { + output.writeMessage( + 3, + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) + attestorType_); + } + if (updateTime_ != null) { + output.writeMessage(4, getUpdateTime()); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + 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 (attestorTypeCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getAttestorTypeCase().equals(other.getAttestorTypeCase())) return false; + switch (attestorTypeCase_) { + case 3: + if (!getUserOwnedGrafeasNote().equals(other.getUserOwnedGrafeasNote())) 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 (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + switch (attestorTypeCase_) { + case 3: + hash = (37 * hash) + USER_OWNED_GRAFEAS_NOTE_FIELD_NUMBER; + hash = (53 * hash) + getUserOwnedGrafeasNote().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image
+     * artifacts. An existing attestor cannot be modified except where
+     * indicated.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.Attestor} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.Attestor) + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + .class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + attestorTypeCase_ = 0; + attestorType_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor(this); + result.name_ = name_; + result.description_ = description_; + if (attestorTypeCase_ == 3) { + if (userOwnedGrafeasNoteBuilder_ == null) { + result.attestorType_ = attestorType_; + } else { + result.attestorType_ = userOwnedGrafeasNoteBuilder_.build(); + } + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.attestorTypeCase_ = attestorTypeCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + switch (other.getAttestorTypeCase()) { + case USER_OWNED_GRAFEAS_NOTE: + { + mergeUserOwnedGrafeasNote(other.getUserOwnedGrafeasNote()); + break; + } + case ATTESTORTYPE_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.protos.google.cloud.binaryauthorization.v1.Resources.Attestor parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int attestorTypeCase_ = 0; + private java.lang.Object attestorType_; + + public AttestorTypeCase getAttestorTypeCase() { + return AttestorTypeCase.forNumber(attestorTypeCase_); + } + + public Builder clearAttestorType() { + attestorTypeCase_ = 0; + attestorType_ = null; + onChanged(); + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name, in the format:
+       * `projects/*/attestors/*`. This field may not be updated.
+       * 
+ * + * 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, in the format:
+       * `projects/*/attestors/*`. This field may not be updated.
+       * 
+ * + * 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, in the format:
+       * `projects/*/attestors/*`. This field may not be updated.
+       * 
+ * + * 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, in the format:
+       * `projects/*/attestors/*`. This field may not be updated.
+       * 
+ * + * 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, in the format:
+       * `projects/*/attestors/*`. This field may not be updated.
+       * 
+ * + * 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_ = ""; + /** + * + * + *
+       * Optional. A descriptive comment.  This field may be updated.
+       * The field may be displayed in chooser dialogs.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment.  This field may be updated.
+       * The field may be displayed in chooser dialogs.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment.  This field may be updated.
+       * The field may be displayed in chooser dialogs.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment.  This field may be updated.
+       * The field may be displayed in chooser dialogs.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment.  This field may be updated.
+       * The field may be displayed in chooser dialogs.
+       * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for description to set. + * @return This builder for chaining. + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder> + userOwnedGrafeasNoteBuilder_; + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return Whether the userOwnedGrafeasNote field is set. + */ + @java.lang.Override + public boolean hasUserOwnedGrafeasNote() { + return attestorTypeCase_ == 3; + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + * + * @return The userOwnedGrafeasNote. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + getUserOwnedGrafeasNote() { + if (userOwnedGrafeasNoteBuilder_ == null) { + if (attestorTypeCase_ == 3) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.getDefaultInstance(); + } else { + if (attestorTypeCase_ == 3) { + return userOwnedGrafeasNoteBuilder_.getMessage(); + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.getDefaultInstance(); + } + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + public Builder setUserOwnedGrafeasNote( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + value) { + if (userOwnedGrafeasNoteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attestorType_ = value; + onChanged(); + } else { + userOwnedGrafeasNoteBuilder_.setMessage(value); + } + attestorTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + public Builder setUserOwnedGrafeasNote( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder + builderForValue) { + if (userOwnedGrafeasNoteBuilder_ == null) { + attestorType_ = builderForValue.build(); + onChanged(); + } else { + userOwnedGrafeasNoteBuilder_.setMessage(builderForValue.build()); + } + attestorTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + public Builder mergeUserOwnedGrafeasNote( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + value) { + if (userOwnedGrafeasNoteBuilder_ == null) { + if (attestorTypeCase_ == 3 + && attestorType_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.getDefaultInstance()) { + attestorType_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .newBuilder( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_) + .mergeFrom(value) + .buildPartial(); + } else { + attestorType_ = value; + } + onChanged(); + } else { + if (attestorTypeCase_ == 3) { + userOwnedGrafeasNoteBuilder_.mergeFrom(value); + } + userOwnedGrafeasNoteBuilder_.setMessage(value); + } + attestorTypeCase_ = 3; + return this; + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + public Builder clearUserOwnedGrafeasNote() { + if (userOwnedGrafeasNoteBuilder_ == null) { + if (attestorTypeCase_ == 3) { + attestorTypeCase_ = 0; + attestorType_ = null; + onChanged(); + } + } else { + if (attestorTypeCase_ == 3) { + attestorTypeCase_ = 0; + attestorType_ = null; + } + userOwnedGrafeasNoteBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder + getUserOwnedGrafeasNoteBuilder() { + return getUserOwnedGrafeasNoteFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder + getUserOwnedGrafeasNoteOrBuilder() { + if ((attestorTypeCase_ == 3) && (userOwnedGrafeasNoteBuilder_ != null)) { + return userOwnedGrafeasNoteBuilder_.getMessageOrBuilder(); + } else { + if (attestorTypeCase_ == 3) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.getDefaultInstance(); + } + } + /** + * + * + *
+       * This specifies how an attestation will be read, and how it will be used
+       * during policy enforcement.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder> + getUserOwnedGrafeasNoteFieldBuilder() { + if (userOwnedGrafeasNoteBuilder_ == null) { + if (!(attestorTypeCase_ == 3)) { + attestorType_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .getDefaultInstance(); + } + userOwnedGrafeasNoteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder>( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote) + attestorType_, + getParentForChildren(), + isClean()); + attestorType_ = null; + } + attestorTypeCase_ = 3; + onChanged(); + ; + return userOwnedGrafeasNoteBuilder_; + } + + 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 when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.Attestor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.Attestor) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Attestor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Attestor(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UserOwnedGrafeasNoteOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The Grafeas resource name of a Attestation.Authority Note,
+     * created by the user, in the format: `projects/*/notes/*`. This field may
+     * not be updated.
+     * An attestation by this attestor is stored as a Grafeas
+     * Attestation.Authority Occurrence that names a container image and that
+     * links to this Note. Grafeas is an external dependency.
+     * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The noteReference. + */ + java.lang.String getNoteReference(); + /** + * + * + *
+     * Required. The Grafeas resource name of a Attestation.Authority Note,
+     * created by the user, in the format: `projects/*/notes/*`. This field may
+     * not be updated.
+     * An attestation by this attestor is stored as a Grafeas
+     * Attestation.Authority Occurrence that names a container image and that
+     * links to this Note. Grafeas is an external dependency.
+     * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for noteReference. + */ + com.google.protobuf.ByteString getNoteReferenceBytes(); + + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> + getPublicKeysList(); + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey getPublicKeys( + int index); + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getPublicKeysCount(); + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder> + getPublicKeysOrBuilderList(); + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKeyOrBuilder + getPublicKeysOrBuilder(int index); + + /** + * + * + *
+     * Output only. This field will contain the service account email address
+     * that this Attestor will use as the principal when querying Container
+     * Analysis. Attestor administrators must grant this service account the
+     * IAM role needed to read attestations from the [note_reference][Note] in
+     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+     * This email address is fixed for the lifetime of the Attestor, but callers
+     * should not make any other assumptions about the service account email;
+     * future versions may use an email based on a different naming pattern.
+     * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The delegationServiceAccountEmail. + */ + java.lang.String getDelegationServiceAccountEmail(); + /** + * + * + *
+     * Output only. This field will contain the service account email address
+     * that this Attestor will use as the principal when querying Container
+     * Analysis. Attestor administrators must grant this service account the
+     * IAM role needed to read attestations from the [note_reference][Note] in
+     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+     * This email address is fixed for the lifetime of the Attestor, but callers
+     * should not make any other assumptions about the service account email;
+     * future versions may use an email based on a different naming pattern.
+     * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for delegationServiceAccountEmail. + */ + com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes(); + } + /** + * + * + *
+   * An [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas
+   * Attestation.Authority Note created by the user.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote} + */ + public static final class UserOwnedGrafeasNote extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) + UserOwnedGrafeasNoteOrBuilder { + private static final long serialVersionUID = 0L; + // Use UserOwnedGrafeasNote.newBuilder() to construct. + private UserOwnedGrafeasNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UserOwnedGrafeasNote() { + noteReference_ = ""; + publicKeys_ = java.util.Collections.emptyList(); + delegationServiceAccountEmail_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UserOwnedGrafeasNote(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UserOwnedGrafeasNote( + 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(); + + noteReference_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + publicKeys_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey>(); + mutable_bitField0_ |= 0x00000001; + } + publicKeys_.add( + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey.parser(), + extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + delegationServiceAccountEmail_ = 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)) { + publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder.class); + } + + public static final int NOTE_REFERENCE_FIELD_NUMBER = 1; + private volatile java.lang.Object noteReference_; + /** + * + * + *
+     * Required. The Grafeas resource name of a Attestation.Authority Note,
+     * created by the user, in the format: `projects/*/notes/*`. This field may
+     * not be updated.
+     * An attestation by this attestor is stored as a Grafeas
+     * Attestation.Authority Occurrence that names a container image and that
+     * links to this Note. Grafeas is an external dependency.
+     * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The noteReference. + */ + @java.lang.Override + public java.lang.String getNoteReference() { + java.lang.Object ref = noteReference_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteReference_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The Grafeas resource name of a Attestation.Authority Note,
+     * created by the user, in the format: `projects/*/notes/*`. This field may
+     * not be updated.
+     * An attestation by this attestor is stored as a Grafeas
+     * Attestation.Authority Occurrence that names a container image and that
+     * links to this Note. Grafeas is an external dependency.
+     * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for noteReference. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNoteReferenceBytes() { + java.lang.Object ref = noteReference_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PUBLIC_KEYS_FIELD_NUMBER = 2; + private java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> + publicKeys_; + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> + getPublicKeysList() { + return publicKeys_; + } + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder> + getPublicKeysOrBuilderList() { + return publicKeys_; + } + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getPublicKeysCount() { + return publicKeys_.size(); + } + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + getPublicKeys(int index) { + return publicKeys_.get(index); + } + /** + * + * + *
+     * Optional. Public keys that verify attestations signed by this
+     * attestor.  This field may be updated.
+     * If this field is non-empty, one of the specified public keys must
+     * verify that an attestation was signed by this attestor for the
+     * image specified in the admission request.
+     * If this field is empty, this attestor always returns that no
+     * valid attestations exist.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder + getPublicKeysOrBuilder(int index) { + return publicKeys_.get(index); + } + + public static final int DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; + private volatile java.lang.Object delegationServiceAccountEmail_; + /** + * + * + *
+     * Output only. This field will contain the service account email address
+     * that this Attestor will use as the principal when querying Container
+     * Analysis. Attestor administrators must grant this service account the
+     * IAM role needed to read attestations from the [note_reference][Note] in
+     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+     * This email address is fixed for the lifetime of the Attestor, but callers
+     * should not make any other assumptions about the service account email;
+     * future versions may use an email based on a different naming pattern.
+     * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The delegationServiceAccountEmail. + */ + @java.lang.Override + public java.lang.String getDelegationServiceAccountEmail() { + java.lang.Object ref = delegationServiceAccountEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + delegationServiceAccountEmail_ = s; + return s; + } + } + /** + * + * + *
+     * Output only. This field will contain the service account email address
+     * that this Attestor will use as the principal when querying Container
+     * Analysis. Attestor administrators must grant this service account the
+     * IAM role needed to read attestations from the [note_reference][Note] in
+     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+     * This email address is fixed for the lifetime of the Attestor, but callers
+     * should not make any other assumptions about the service account email;
+     * future versions may use an email based on a different naming pattern.
+     * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for delegationServiceAccountEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { + java.lang.Object ref = delegationServiceAccountEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + delegationServiceAccountEmail_ = 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 (!getNoteReferenceBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, noteReference_); + } + for (int i = 0; i < publicKeys_.size(); i++) { + output.writeMessage(2, publicKeys_.get(i)); + } + if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 3, delegationServiceAccountEmail_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNoteReferenceBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, noteReference_); + } + for (int i = 0; i < publicKeys_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, publicKeys_.get(i)); + } + if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize( + 3, delegationServiceAccountEmail_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) + obj; + + if (!getNoteReference().equals(other.getNoteReference())) return false; + if (!getPublicKeysList().equals(other.getPublicKeysList())) return false; + if (!getDelegationServiceAccountEmail().equals(other.getDelegationServiceAccountEmail())) + return false; + if (!unknownFields.equals(other.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) + NOTE_REFERENCE_FIELD_NUMBER; + hash = (53 * hash) + getNoteReference().hashCode(); + if (getPublicKeysCount() > 0) { + hash = (37 * hash) + PUBLIC_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getPublicKeysList().hashCode(); + } + hash = (37 * hash) + DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getDelegationServiceAccountEmail().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas
+     * Attestation.Authority Note created by the user.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPublicKeysFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + noteReference_ = ""; + + if (publicKeysBuilder_ == null) { + publicKeys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + publicKeysBuilder_.clear(); + } + delegationServiceAccountEmail_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote(this); + int from_bitField0_ = bitField0_; + result.noteReference_ = noteReference_; + if (publicKeysBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.publicKeys_ = publicKeys_; + } else { + result.publicKeys_ = publicKeysBuilder_.build(); + } + result.delegationServiceAccountEmail_ = delegationServiceAccountEmail_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + .getDefaultInstance()) return this; + if (!other.getNoteReference().isEmpty()) { + noteReference_ = other.noteReference_; + onChanged(); + } + if (publicKeysBuilder_ == null) { + if (!other.publicKeys_.isEmpty()) { + if (publicKeys_.isEmpty()) { + publicKeys_ = other.publicKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePublicKeysIsMutable(); + publicKeys_.addAll(other.publicKeys_); + } + onChanged(); + } + } else { + if (!other.publicKeys_.isEmpty()) { + if (publicKeysBuilder_.isEmpty()) { + publicKeysBuilder_.dispose(); + publicKeysBuilder_ = null; + publicKeys_ = other.publicKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + publicKeysBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPublicKeysFieldBuilder() + : null; + } else { + publicKeysBuilder_.addAllMessages(other.publicKeys_); + } + } + } + if (!other.getDelegationServiceAccountEmail().isEmpty()) { + delegationServiceAccountEmail_ = other.delegationServiceAccountEmail_; + 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.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object noteReference_ = ""; + /** + * + * + *
+       * Required. The Grafeas resource name of a Attestation.Authority Note,
+       * created by the user, in the format: `projects/*/notes/*`. This field may
+       * not be updated.
+       * An attestation by this attestor is stored as a Grafeas
+       * Attestation.Authority Occurrence that names a container image and that
+       * links to this Note. Grafeas is an external dependency.
+       * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The noteReference. + */ + public java.lang.String getNoteReference() { + java.lang.Object ref = noteReference_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + noteReference_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The Grafeas resource name of a Attestation.Authority Note,
+       * created by the user, in the format: `projects/*/notes/*`. This field may
+       * not be updated.
+       * An attestation by this attestor is stored as a Grafeas
+       * Attestation.Authority Occurrence that names a container image and that
+       * links to this Note. Grafeas is an external dependency.
+       * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for noteReference. + */ + public com.google.protobuf.ByteString getNoteReferenceBytes() { + java.lang.Object ref = noteReference_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + noteReference_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The Grafeas resource name of a Attestation.Authority Note,
+       * created by the user, in the format: `projects/*/notes/*`. This field may
+       * not be updated.
+       * An attestation by this attestor is stored as a Grafeas
+       * Attestation.Authority Occurrence that names a container image and that
+       * links to this Note. Grafeas is an external dependency.
+       * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The noteReference to set. + * @return This builder for chaining. + */ + public Builder setNoteReference(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + noteReference_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The Grafeas resource name of a Attestation.Authority Note,
+       * created by the user, in the format: `projects/*/notes/*`. This field may
+       * not be updated.
+       * An attestation by this attestor is stored as a Grafeas
+       * Attestation.Authority Occurrence that names a container image and that
+       * links to this Note. Grafeas is an external dependency.
+       * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearNoteReference() { + + noteReference_ = getDefaultInstance().getNoteReference(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The Grafeas resource name of a Attestation.Authority Note,
+       * created by the user, in the format: `projects/*/notes/*`. This field may
+       * not be updated.
+       * An attestation by this attestor is stored as a Grafeas
+       * Attestation.Authority Occurrence that names a container image and that
+       * links to this Note. Grafeas is an external dependency.
+       * 
+ * + * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for noteReference to set. + * @return This builder for chaining. + */ + public Builder setNoteReferenceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + noteReference_ = value; + onChanged(); + return this; + } + + private java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> + publicKeys_ = java.util.Collections.emptyList(); + + private void ensurePublicKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + publicKeys_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey>(publicKeys_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder> + publicKeysBuilder_; + + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> + getPublicKeysList() { + if (publicKeysBuilder_ == null) { + return java.util.Collections.unmodifiableList(publicKeys_); + } else { + return publicKeysBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getPublicKeysCount() { + if (publicKeysBuilder_ == null) { + return publicKeys_.size(); + } else { + return publicKeysBuilder_.getCount(); + } + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + getPublicKeys(int index) { + if (publicKeysBuilder_ == null) { + return publicKeys_.get(index); + } else { + return publicKeysBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublicKeys( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { + if (publicKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePublicKeysIsMutable(); + publicKeys_.set(index, value); + onChanged(); + } else { + publicKeysBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setPublicKeys( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder + builderForValue) { + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.set(index, builderForValue.build()); + onChanged(); + } else { + publicKeysBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPublicKeys( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { + if (publicKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePublicKeysIsMutable(); + publicKeys_.add(value); + onChanged(); + } else { + publicKeysBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPublicKeys( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { + if (publicKeysBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePublicKeysIsMutable(); + publicKeys_.add(index, value); + onChanged(); + } else { + publicKeysBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPublicKeys( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder + builderForValue) { + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.add(builderForValue.build()); + onChanged(); + } else { + publicKeysBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addPublicKeys( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder + builderForValue) { + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.add(index, builderForValue.build()); + onChanged(); + } else { + publicKeysBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllPublicKeys( + java.lang.Iterable< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey> + values) { + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, publicKeys_); + onChanged(); + } else { + publicKeysBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearPublicKeys() { + if (publicKeysBuilder_ == null) { + publicKeys_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + publicKeysBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removePublicKeys(int index) { + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.remove(index); + onChanged(); + } else { + publicKeysBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder + getPublicKeysBuilder(int index) { + return getPublicKeysFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder + getPublicKeysOrBuilder(int index) { + if (publicKeysBuilder_ == null) { + return publicKeys_.get(index); + } else { + return publicKeysBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder> + getPublicKeysOrBuilderList() { + if (publicKeysBuilder_ != null) { + return publicKeysBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(publicKeys_); + } + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder + addPublicKeysBuilder() { + return getPublicKeysFieldBuilder() + .addBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder + addPublicKeysBuilder(int index) { + return getPublicKeysFieldBuilder() + .addBuilder( + index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .getDefaultInstance()); + } + /** + * + * + *
+       * Optional. Public keys that verify attestations signed by this
+       * attestor.  This field may be updated.
+       * If this field is non-empty, one of the specified public keys must
+       * verify that an attestation was signed by this attestor for the
+       * image specified in the admission request.
+       * If this field is empty, this attestor always returns that no
+       * valid attestations exist.
+       * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder> + getPublicKeysBuilderList() { + return getPublicKeysFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder> + getPublicKeysFieldBuilder() { + if (publicKeysBuilder_ == null) { + publicKeysBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKeyOrBuilder>( + publicKeys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + publicKeys_ = null; + } + return publicKeysBuilder_; + } + + private java.lang.Object delegationServiceAccountEmail_ = ""; + /** + * + * + *
+       * Output only. This field will contain the service account email address
+       * that this Attestor will use as the principal when querying Container
+       * Analysis. Attestor administrators must grant this service account the
+       * IAM role needed to read attestations from the [note_reference][Note] in
+       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+       * This email address is fixed for the lifetime of the Attestor, but callers
+       * should not make any other assumptions about the service account email;
+       * future versions may use an email based on a different naming pattern.
+       * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The delegationServiceAccountEmail. + */ + public java.lang.String getDelegationServiceAccountEmail() { + java.lang.Object ref = delegationServiceAccountEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + delegationServiceAccountEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Output only. This field will contain the service account email address
+       * that this Attestor will use as the principal when querying Container
+       * Analysis. Attestor administrators must grant this service account the
+       * IAM role needed to read attestations from the [note_reference][Note] in
+       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+       * This email address is fixed for the lifetime of the Attestor, but callers
+       * should not make any other assumptions about the service account email;
+       * future versions may use an email based on a different naming pattern.
+       * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The bytes for delegationServiceAccountEmail. + */ + public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { + java.lang.Object ref = delegationServiceAccountEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + delegationServiceAccountEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Output only. This field will contain the service account email address
+       * that this Attestor will use as the principal when querying Container
+       * Analysis. Attestor administrators must grant this service account the
+       * IAM role needed to read attestations from the [note_reference][Note] in
+       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+       * This email address is fixed for the lifetime of the Attestor, but callers
+       * should not make any other assumptions about the service account email;
+       * future versions may use an email based on a different naming pattern.
+       * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The delegationServiceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setDelegationServiceAccountEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + delegationServiceAccountEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. This field will contain the service account email address
+       * that this Attestor will use as the principal when querying Container
+       * Analysis. Attestor administrators must grant this service account the
+       * IAM role needed to read attestations from the [note_reference][Note] in
+       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+       * This email address is fixed for the lifetime of the Attestor, but callers
+       * should not make any other assumptions about the service account email;
+       * future versions may use an email based on a different naming pattern.
+       * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDelegationServiceAccountEmail() { + + delegationServiceAccountEmail_ = getDefaultInstance().getDelegationServiceAccountEmail(); + onChanged(); + return this; + } + /** + * + * + *
+       * Output only. This field will contain the service account email address
+       * that this Attestor will use as the principal when querying Container
+       * Analysis. Attestor administrators must grant this service account the
+       * IAM role needed to read attestations from the [note_reference][Note] in
+       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
+       * This email address is fixed for the lifetime of the Attestor, but callers
+       * should not make any other assumptions about the service account email;
+       * future versions may use an email based on a different naming pattern.
+       * 
+ * + * + * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The bytes for delegationServiceAccountEmail to set. + * @return This builder for chaining. + */ + public Builder setDelegationServiceAccountEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + delegationServiceAccountEmail_ = 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.binaryauthorization.v1.UserOwnedGrafeasNote) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources + .UserOwnedGrafeasNote + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UserOwnedGrafeasNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UserOwnedGrafeasNote(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface PkixPublicKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.PkixPublicKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * A PEM-encoded public key, as described in
+     * https://tools.ietf.org/html/rfc7468#section-13
+     * 
+ * + * string public_key_pem = 1; + * + * @return The publicKeyPem. + */ + java.lang.String getPublicKeyPem(); + /** + * + * + *
+     * A PEM-encoded public key, as described in
+     * https://tools.ietf.org/html/rfc7468#section-13
+     * 
+ * + * string public_key_pem = 1; + * + * @return The bytes for publicKeyPem. + */ + com.google.protobuf.ByteString getPublicKeyPemBytes(); + + /** + * + * + *
+     * The signature algorithm used to verify a message against a signature using
+     * this key.
+     * These signature algorithm must match the structure and any object
+     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+     * that of the public key).
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The enum numeric value on the wire for signatureAlgorithm. + */ + int getSignatureAlgorithmValue(); + /** + * + * + *
+     * The signature algorithm used to verify a message against a signature using
+     * this key.
+     * These signature algorithm must match the structure and any object
+     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+     * that of the public key).
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The signatureAlgorithm. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.SignatureAlgorithm + getSignatureAlgorithm(); + } + /** + * + * + *
+   * A public key in the PkixPublicKey format (see
+   * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
+   * Public keys of this type are typically textually encoded using the PEM
+   * format.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.PkixPublicKey} + */ + public static final class PkixPublicKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.PkixPublicKey) + PkixPublicKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use PkixPublicKey.newBuilder() to construct. + private PkixPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PkixPublicKey() { + publicKeyPem_ = ""; + signatureAlgorithm_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PkixPublicKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PkixPublicKey( + 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(); + + publicKeyPem_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + signatureAlgorithm_ = 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.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder + .class); + } + + /** + * + * + *
+     * Represents a signature algorithm and other information necessary to verify
+     * signatures with a given public key.
+     * This is based primarily on the public key types supported by Tink's
+     * PemKeyType, which is in turn based on KMS's supported signing algorithms.
+     * See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz
+     * might support additional public key types independently of Tink and/or KMS.
+     * 
+ * + * Protobuf enum {@code google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm} + */ + public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not specified.
+       * 
+ * + * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + */ + SIGNATURE_ALGORITHM_UNSPECIFIED(0, 0), + /** + * + * + *
+       * RSASSA-PSS 2048 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_2048_SHA256 = 1; + */ + RSA_PSS_2048_SHA256(1, 1), + /** + * + * + *
+       * RSASSA-PSS 3072 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_3072_SHA256 = 2; + */ + RSA_PSS_3072_SHA256(2, 2), + /** + * + * + *
+       * RSASSA-PSS 4096 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_4096_SHA256 = 3; + */ + RSA_PSS_4096_SHA256(3, 3), + /** + * + * + *
+       * RSASSA-PSS 4096 bit key with a SHA512 digest.
+       * 
+ * + * RSA_PSS_4096_SHA512 = 4; + */ + RSA_PSS_4096_SHA512(4, 4), + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_2048_SHA256 = 5; + */ + RSA_SIGN_PKCS1_2048_SHA256(5, 5), + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_3072_SHA256 = 6; + */ + RSA_SIGN_PKCS1_3072_SHA256(6, 6), + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_4096_SHA256 = 7; + */ + RSA_SIGN_PKCS1_4096_SHA256(7, 7), + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_4096_SHA512 = 8; + */ + RSA_SIGN_PKCS1_4096_SHA512(8, 8), + /** + * + * + *
+       * ECDSA on the NIST P-256 curve with a SHA256 digest.
+       * 
+ * + * ECDSA_P256_SHA256 = 9; + */ + ECDSA_P256_SHA256(9, 9), + /** + * + * + *
+       * ECDSA on the NIST P-384 curve with a SHA384 digest.
+       * 
+ * + * ECDSA_P384_SHA384 = 10; + */ + ECDSA_P384_SHA384(11, 10), + /** + * + * + *
+       * ECDSA on the NIST P-521 curve with a SHA512 digest.
+       * 
+ * + * ECDSA_P521_SHA512 = 11; + */ + ECDSA_P521_SHA512(13, 11), + UNRECOGNIZED(-1, -1), + ; + + /** + * + * + *
+       * ECDSA on the NIST P-256 curve with a SHA256 digest.
+       * 
+ * + * EC_SIGN_P256_SHA256 = 9; + */ + public static final SignatureAlgorithm EC_SIGN_P256_SHA256 = ECDSA_P256_SHA256; + /** + * + * + *
+       * ECDSA on the NIST P-384 curve with a SHA384 digest.
+       * 
+ * + * EC_SIGN_P384_SHA384 = 10; + */ + public static final SignatureAlgorithm EC_SIGN_P384_SHA384 = ECDSA_P384_SHA384; + /** + * + * + *
+       * ECDSA on the NIST P-521 curve with a SHA512 digest.
+       * 
+ * + * EC_SIGN_P521_SHA512 = 11; + */ + public static final SignatureAlgorithm EC_SIGN_P521_SHA512 = ECDSA_P521_SHA512; + /** + * + * + *
+       * Not specified.
+       * 
+ * + * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + */ + public static final int SIGNATURE_ALGORITHM_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * RSASSA-PSS 2048 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_2048_SHA256 = 1; + */ + public static final int RSA_PSS_2048_SHA256_VALUE = 1; + /** + * + * + *
+       * RSASSA-PSS 3072 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_3072_SHA256 = 2; + */ + public static final int RSA_PSS_3072_SHA256_VALUE = 2; + /** + * + * + *
+       * RSASSA-PSS 4096 bit key with a SHA256 digest.
+       * 
+ * + * RSA_PSS_4096_SHA256 = 3; + */ + public static final int RSA_PSS_4096_SHA256_VALUE = 3; + /** + * + * + *
+       * RSASSA-PSS 4096 bit key with a SHA512 digest.
+       * 
+ * + * RSA_PSS_4096_SHA512 = 4; + */ + public static final int RSA_PSS_4096_SHA512_VALUE = 4; + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_2048_SHA256 = 5; + */ + public static final int RSA_SIGN_PKCS1_2048_SHA256_VALUE = 5; + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_3072_SHA256 = 6; + */ + public static final int RSA_SIGN_PKCS1_3072_SHA256_VALUE = 6; + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_4096_SHA256 = 7; + */ + public static final int RSA_SIGN_PKCS1_4096_SHA256_VALUE = 7; + /** + * + * + *
+       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
+       * 
+ * + * RSA_SIGN_PKCS1_4096_SHA512 = 8; + */ + public static final int RSA_SIGN_PKCS1_4096_SHA512_VALUE = 8; + /** + * + * + *
+       * ECDSA on the NIST P-256 curve with a SHA256 digest.
+       * 
+ * + * ECDSA_P256_SHA256 = 9; + */ + public static final int ECDSA_P256_SHA256_VALUE = 9; + /** + * + * + *
+       * ECDSA on the NIST P-256 curve with a SHA256 digest.
+       * 
+ * + * EC_SIGN_P256_SHA256 = 9; + */ + public static final int EC_SIGN_P256_SHA256_VALUE = 9; + /** + * + * + *
+       * ECDSA on the NIST P-384 curve with a SHA384 digest.
+       * 
+ * + * ECDSA_P384_SHA384 = 10; + */ + public static final int ECDSA_P384_SHA384_VALUE = 10; + /** + * + * + *
+       * ECDSA on the NIST P-384 curve with a SHA384 digest.
+       * 
+ * + * EC_SIGN_P384_SHA384 = 10; + */ + public static final int EC_SIGN_P384_SHA384_VALUE = 10; + /** + * + * + *
+       * ECDSA on the NIST P-521 curve with a SHA512 digest.
+       * 
+ * + * ECDSA_P521_SHA512 = 11; + */ + public static final int ECDSA_P521_SHA512_VALUE = 11; + /** + * + * + *
+       * ECDSA on the NIST P-521 curve with a SHA512 digest.
+       * 
+ * + * EC_SIGN_P521_SHA512 = 11; + */ + public static final int EC_SIGN_P521_SHA512_VALUE = 11; + + public final int getNumber() { + if (index == -1) { + 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 SignatureAlgorithm 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 SignatureAlgorithm forNumber(int value) { + switch (value) { + case 0: + return SIGNATURE_ALGORITHM_UNSPECIFIED; + case 1: + return RSA_PSS_2048_SHA256; + case 2: + return RSA_PSS_3072_SHA256; + case 3: + return RSA_PSS_4096_SHA256; + case 4: + return RSA_PSS_4096_SHA512; + case 5: + return RSA_SIGN_PKCS1_2048_SHA256; + case 6: + return RSA_SIGN_PKCS1_3072_SHA256; + case 7: + return RSA_SIGN_PKCS1_4096_SHA256; + case 8: + return RSA_SIGN_PKCS1_4096_SHA512; + case 9: + return ECDSA_P256_SHA256; + case 10: + return ECDSA_P384_SHA384; + case 11: + return ECDSA_P521_SHA512; + 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 SignatureAlgorithm findValueByNumber(int number) { + return SignatureAlgorithm.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (index == -1) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(index); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final SignatureAlgorithm[] VALUES = getStaticValuesArray(); + + private static SignatureAlgorithm[] getStaticValuesArray() { + return new SignatureAlgorithm[] { + SIGNATURE_ALGORITHM_UNSPECIFIED, + RSA_PSS_2048_SHA256, + RSA_PSS_3072_SHA256, + RSA_PSS_4096_SHA256, + RSA_PSS_4096_SHA512, + RSA_SIGN_PKCS1_2048_SHA256, + RSA_SIGN_PKCS1_3072_SHA256, + RSA_SIGN_PKCS1_4096_SHA256, + RSA_SIGN_PKCS1_4096_SHA512, + ECDSA_P256_SHA256, + EC_SIGN_P256_SHA256, + ECDSA_P384_SHA384, + EC_SIGN_P384_SHA384, + ECDSA_P521_SHA512, + EC_SIGN_P521_SHA512, + }; + } + + public static SignatureAlgorithm 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 index; + private final int value; + + private SignatureAlgorithm(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm) + } + + public static final int PUBLIC_KEY_PEM_FIELD_NUMBER = 1; + private volatile java.lang.Object publicKeyPem_; + /** + * + * + *
+     * A PEM-encoded public key, as described in
+     * https://tools.ietf.org/html/rfc7468#section-13
+     * 
+ * + * string public_key_pem = 1; + * + * @return The publicKeyPem. + */ + @java.lang.Override + public java.lang.String getPublicKeyPem() { + java.lang.Object ref = publicKeyPem_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyPem_ = s; + return s; + } + } + /** + * + * + *
+     * A PEM-encoded public key, as described in
+     * https://tools.ietf.org/html/rfc7468#section-13
+     * 
+ * + * string public_key_pem = 1; + * + * @return The bytes for publicKeyPem. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicKeyPemBytes() { + java.lang.Object ref = publicKeyPem_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicKeyPem_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SIGNATURE_ALGORITHM_FIELD_NUMBER = 2; + private int signatureAlgorithm_; + /** + * + * + *
+     * The signature algorithm used to verify a message against a signature using
+     * this key.
+     * These signature algorithm must match the structure and any object
+     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+     * that of the public key).
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The enum numeric value on the wire for signatureAlgorithm. + */ + @java.lang.Override + public int getSignatureAlgorithmValue() { + return signatureAlgorithm_; + } + /** + * + * + *
+     * The signature algorithm used to verify a message against a signature using
+     * this key.
+     * These signature algorithm must match the structure and any object
+     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+     * that of the public key).
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The signatureAlgorithm. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm + getSignatureAlgorithm() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.valueOf(signatureAlgorithm_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.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 (!getPublicKeyPemBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKeyPem_); + } + if (signatureAlgorithm_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.SIGNATURE_ALGORITHM_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, signatureAlgorithm_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPublicKeyPemBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKeyPem_); + } + if (signatureAlgorithm_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.SIGNATURE_ALGORITHM_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, signatureAlgorithm_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) obj; + + if (!getPublicKeyPem().equals(other.getPublicKeyPem())) return false; + if (signatureAlgorithm_ != other.signatureAlgorithm_) return false; + if (!unknownFields.equals(other.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) + PUBLIC_KEY_PEM_FIELD_NUMBER; + hash = (53 * hash) + getPublicKeyPem().hashCode(); + hash = (37 * hash) + SIGNATURE_ALGORITHM_FIELD_NUMBER; + hash = (53 * hash) + signatureAlgorithm_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 public key in the PkixPublicKey format (see
+     * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
+     * Public keys of this type are typically textually encoded using the PEM
+     * format.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.PkixPublicKey} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.PkixPublicKey) + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + publicKeyPem_ = ""; + + signatureAlgorithm_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey(this); + result.publicKeyPem_ = publicKeyPem_; + result.signatureAlgorithm_ = signatureAlgorithm_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance()) return this; + if (!other.getPublicKeyPem().isEmpty()) { + publicKeyPem_ = other.publicKeyPem_; + onChanged(); + } + if (other.signatureAlgorithm_ != 0) { + setSignatureAlgorithmValue(other.getSignatureAlgorithmValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object publicKeyPem_ = ""; + /** + * + * + *
+       * A PEM-encoded public key, as described in
+       * https://tools.ietf.org/html/rfc7468#section-13
+       * 
+ * + * string public_key_pem = 1; + * + * @return The publicKeyPem. + */ + public java.lang.String getPublicKeyPem() { + java.lang.Object ref = publicKeyPem_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicKeyPem_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A PEM-encoded public key, as described in
+       * https://tools.ietf.org/html/rfc7468#section-13
+       * 
+ * + * string public_key_pem = 1; + * + * @return The bytes for publicKeyPem. + */ + public com.google.protobuf.ByteString getPublicKeyPemBytes() { + java.lang.Object ref = publicKeyPem_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicKeyPem_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A PEM-encoded public key, as described in
+       * https://tools.ietf.org/html/rfc7468#section-13
+       * 
+ * + * string public_key_pem = 1; + * + * @param value The publicKeyPem to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyPem(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicKeyPem_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A PEM-encoded public key, as described in
+       * https://tools.ietf.org/html/rfc7468#section-13
+       * 
+ * + * string public_key_pem = 1; + * + * @return This builder for chaining. + */ + public Builder clearPublicKeyPem() { + + publicKeyPem_ = getDefaultInstance().getPublicKeyPem(); + onChanged(); + return this; + } + /** + * + * + *
+       * A PEM-encoded public key, as described in
+       * https://tools.ietf.org/html/rfc7468#section-13
+       * 
+ * + * string public_key_pem = 1; + * + * @param value The bytes for publicKeyPem to set. + * @return This builder for chaining. + */ + public Builder setPublicKeyPemBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicKeyPem_ = value; + onChanged(); + return this; + } + + private int signatureAlgorithm_ = 0; + /** + * + * + *
+       * The signature algorithm used to verify a message against a signature using
+       * this key.
+       * These signature algorithm must match the structure and any object
+       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+       * that of the public key).
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The enum numeric value on the wire for signatureAlgorithm. + */ + @java.lang.Override + public int getSignatureAlgorithmValue() { + return signatureAlgorithm_; + } + /** + * + * + *
+       * The signature algorithm used to verify a message against a signature using
+       * this key.
+       * These signature algorithm must match the structure and any object
+       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+       * that of the public key).
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @param value The enum numeric value on the wire for signatureAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setSignatureAlgorithmValue(int value) { + + signatureAlgorithm_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The signature algorithm used to verify a message against a signature using
+       * this key.
+       * These signature algorithm must match the structure and any object
+       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+       * that of the public key).
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return The signatureAlgorithm. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm + getSignatureAlgorithm() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm + result = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.valueOf(signatureAlgorithm_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The signature algorithm used to verify a message against a signature using
+       * this key.
+       * These signature algorithm must match the structure and any object
+       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+       * that of the public key).
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @param value The signatureAlgorithm to set. + * @return This builder for chaining. + */ + public Builder setSignatureAlgorithm( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .SignatureAlgorithm + value) { + if (value == null) { + throw new NullPointerException(); + } + + signatureAlgorithm_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The signature algorithm used to verify a message against a signature using
+       * this key.
+       * These signature algorithm must match the structure and any object
+       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
+       * that of the public key).
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearSignatureAlgorithm() { + + signatureAlgorithm_ = 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.binaryauthorization.v1.PkixPublicKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.PkixPublicKey) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKey + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PkixPublicKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PkixPublicKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface AttestorPublicKeyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AttestorPublicKey) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. A descriptive comment. This field may be updated.
+     * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + java.lang.String getComment(); + /** + * + * + *
+     * Optional. A descriptive comment. This field may be updated.
+     * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + com.google.protobuf.ByteString getCommentBytes(); + + /** + * + * + *
+     * The ID of this public key.
+     * Signatures verified by BinAuthz must include the ID of the public key that
+     * can be used to verify them, and that ID must match the contents of this
+     * field exactly.
+     * Additional restrictions on this field can be imposed based on which public
+     * key type is encapsulated. See the documentation on `public_key` cases below
+     * for details.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+     * The ID of this public key.
+     * Signatures verified by BinAuthz must include the ID of the public key that
+     * can be used to verify them, and that ID must match the contents of this
+     * field exactly.
+     * Additional restrictions on this field can be imposed based on which public
+     * key type is encapsulated. See the documentation on `public_key` cases below
+     * for details.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return Whether the asciiArmoredPgpPublicKey field is set. + */ + boolean hasAsciiArmoredPgpPublicKey(); + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The asciiArmoredPgpPublicKey. + */ + java.lang.String getAsciiArmoredPgpPublicKey(); + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The bytes for asciiArmoredPgpPublicKey. + */ + com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes(); + + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return Whether the pkixPublicKey field is set. + */ + boolean hasPkixPublicKey(); + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return The pkixPublicKey. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getPkixPublicKey(); + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder + getPkixPublicKeyOrBuilder(); + + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .PublicKeyCase + getPublicKeyCase(); + } + /** + * + * + *
+   * An [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify
+   * attestations signed by this attestor.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AttestorPublicKey} + */ + public static final class AttestorPublicKey extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AttestorPublicKey) + AttestorPublicKeyOrBuilder { + private static final long serialVersionUID = 0L; + // Use AttestorPublicKey.newBuilder() to construct. + private AttestorPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AttestorPublicKey() { + comment_ = ""; + id_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AttestorPublicKey(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AttestorPublicKey( + 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(); + + comment_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + publicKeyCase_ = 3; + publicKey_ = s; + break; + } + case 42: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .Builder + subBuilder = null; + if (publicKeyCase_ == 5) { + subBuilder = + ((com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKey) + publicKey_) + .toBuilder(); + } + publicKey_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKey.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKey) + publicKey_); + publicKey_ = subBuilder.buildPartial(); + } + publicKeyCase_ = 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.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder.class); + } + + private int publicKeyCase_ = 0; + private java.lang.Object publicKey_; + + public enum PublicKeyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + ASCII_ARMORED_PGP_PUBLIC_KEY(3), + PKIX_PUBLIC_KEY(5), + PUBLICKEY_NOT_SET(0); + private final int value; + + private PublicKeyCase(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 PublicKeyCase valueOf(int value) { + return forNumber(value); + } + + public static PublicKeyCase forNumber(int value) { + switch (value) { + case 3: + return ASCII_ARMORED_PGP_PUBLIC_KEY; + case 5: + return PKIX_PUBLIC_KEY; + case 0: + return PUBLICKEY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PublicKeyCase getPublicKeyCase() { + return PublicKeyCase.forNumber(publicKeyCase_); + } + + public static final int COMMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object comment_; + /** + * + * + *
+     * Optional. A descriptive comment. This field may be updated.
+     * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + @java.lang.Override + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. A descriptive comment. This field may be updated.
+     * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+     * The ID of this public key.
+     * Signatures verified by BinAuthz must include the ID of the public key that
+     * can be used to verify them, and that ID must match the contents of this
+     * field exactly.
+     * Additional restrictions on this field can be imposed based on which public
+     * key type is encapsulated. See the documentation on `public_key` cases below
+     * for details.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+     * The ID of this public key.
+     * Signatures verified by BinAuthz must include the ID of the public key that
+     * can be used to verify them, and that ID must match the contents of this
+     * field exactly.
+     * Additional restrictions on this field can be imposed based on which public
+     * key type is encapsulated. See the documentation on `public_key` cases below
+     * for details.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER = 3; + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return Whether the asciiArmoredPgpPublicKey field is set. + */ + public boolean hasAsciiArmoredPgpPublicKey() { + return publicKeyCase_ == 3; + } + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The asciiArmoredPgpPublicKey. + */ + public java.lang.String getAsciiArmoredPgpPublicKey() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 3) { + ref = publicKey_; + } + if (ref instanceof java.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 (publicKeyCase_ == 3) { + publicKey_ = s; + } + return s; + } + } + /** + * + * + *
+     * ASCII-armored representation of a PGP public key, as the entire output by
+     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+     * line endings).
+     * When using this field, `id` should be left blank.  The BinAuthz API
+     * handlers will calculate the ID and fill it in automatically.  BinAuthz
+     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+     * upper-case hex.  If `id` is provided by the caller, it will be
+     * overwritten by the API-calculated ID.
+     * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The bytes for asciiArmoredPgpPublicKey. + */ + public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 3) { + ref = publicKey_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (publicKeyCase_ == 3) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PKIX_PUBLIC_KEY_FIELD_NUMBER = 5; + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return Whether the pkixPublicKey field is set. + */ + @java.lang.Override + public boolean hasPkixPublicKey() { + return publicKeyCase_ == 5; + } + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return The pkixPublicKey. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getPkixPublicKey() { + if (publicKeyCase_ == 5) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } + /** + * + * + *
+     * A raw PKIX SubjectPublicKeyInfo format public key.
+     * NOTE: `id` may be explicitly provided by the caller when using this
+     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+     * blank, a default one will be computed based on the digest of the DER
+     * encoding of the public key.
+     * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder + getPkixPublicKeyOrBuilder() { + if (publicKeyCase_ == 5) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .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 (!getCommentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, comment_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + if (publicKeyCase_ == 3) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); + } + if (publicKeyCase_ == 5) { + output.writeMessage( + 5, + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCommentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, comment_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + if (publicKeyCase_ == 3) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); + } + if (publicKeyCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey other = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) obj; + + if (!getComment().equals(other.getComment())) return false; + if (!getId().equals(other.getId())) return false; + if (!getPublicKeyCase().equals(other.getPublicKeyCase())) return false; + switch (publicKeyCase_) { + case 3: + if (!getAsciiArmoredPgpPublicKey().equals(other.getAsciiArmoredPgpPublicKey())) + return false; + break; + case 5: + if (!getPkixPublicKey().equals(other.getPkixPublicKey())) 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) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + switch (publicKeyCase_) { + case 3: + hash = (37 * hash) + ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getAsciiArmoredPgpPublicKey().hashCode(); + break; + case 5: + hash = (37 * hash) + PKIX_PUBLIC_KEY_FIELD_NUMBER; + hash = (53 * hash) + getPkixPublicKey().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify
+     * attestations signed by this attestor.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.AttestorPublicKey} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AttestorPublicKey) + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKeyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + comment_ = ""; + + id_ = ""; + + publicKeyCase_ = 0; + publicKey_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources + .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey result = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey( + this); + result.comment_ = comment_; + result.id_ = id_; + if (publicKeyCase_ == 3) { + result.publicKey_ = publicKey_; + } + if (publicKeyCase_ == 5) { + if (pkixPublicKeyBuilder_ == null) { + result.publicKey_ = publicKey_; + } else { + result.publicKey_ = pkixPublicKeyBuilder_.build(); + } + } + result.publicKeyCase_ = publicKeyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + .getDefaultInstance()) return this; + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + switch (other.getPublicKeyCase()) { + case ASCII_ARMORED_PGP_PUBLIC_KEY: + { + publicKeyCase_ = 3; + publicKey_ = other.publicKey_; + onChanged(); + break; + } + case PKIX_PUBLIC_KEY: + { + mergePkixPublicKey(other.getPkixPublicKey()); + break; + } + case PUBLICKEY_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.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int publicKeyCase_ = 0; + private java.lang.Object publicKey_; + + public PublicKeyCase getPublicKeyCase() { + return PublicKeyCase.forNumber(publicKeyCase_); + } + + public Builder clearPublicKey() { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + * + * + *
+       * Optional. A descriptive comment. This field may be updated.
+       * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The comment. + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment. This field may be updated.
+       * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for comment. + */ + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. A descriptive comment. This field may be updated.
+       * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The comment to set. + * @return This builder for chaining. + */ + public Builder setComment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + comment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment. This field may be updated.
+       * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearComment() { + + comment_ = getDefaultInstance().getComment(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A descriptive comment. This field may be updated.
+       * 
+ * + * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for comment to set. + * @return This builder for chaining. + */ + public Builder setCommentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + comment_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+       * The ID of this public key.
+       * Signatures verified by BinAuthz must include the ID of the public key that
+       * can be used to verify them, and that ID must match the contents of this
+       * field exactly.
+       * Additional restrictions on this field can be imposed based on which public
+       * key type is encapsulated. See the documentation on `public_key` cases below
+       * for details.
+       * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The ID of this public key.
+       * Signatures verified by BinAuthz must include the ID of the public key that
+       * can be used to verify them, and that ID must match the contents of this
+       * field exactly.
+       * Additional restrictions on this field can be imposed based on which public
+       * key type is encapsulated. See the documentation on `public_key` cases below
+       * for details.
+       * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The ID of this public key.
+       * Signatures verified by BinAuthz must include the ID of the public key that
+       * can be used to verify them, and that ID must match the contents of this
+       * field exactly.
+       * Additional restrictions on this field can be imposed based on which public
+       * key type is encapsulated. See the documentation on `public_key` cases below
+       * for details.
+       * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of this public key.
+       * Signatures verified by BinAuthz must include the ID of the public key that
+       * can be used to verify them, and that ID must match the contents of this
+       * field exactly.
+       * Additional restrictions on this field can be imposed based on which public
+       * key type is encapsulated. See the documentation on `public_key` cases below
+       * for details.
+       * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+       * The ID of this public key.
+       * Signatures verified by BinAuthz must include the ID of the public key that
+       * can be used to verify them, and that ID must match the contents of this
+       * field exactly.
+       * Additional restrictions on this field can be imposed based on which public
+       * key type is encapsulated. See the documentation on `public_key` cases below
+       * for details.
+       * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return Whether the asciiArmoredPgpPublicKey field is set. + */ + @java.lang.Override + public boolean hasAsciiArmoredPgpPublicKey() { + return publicKeyCase_ == 3; + } + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The asciiArmoredPgpPublicKey. + */ + @java.lang.Override + public java.lang.String getAsciiArmoredPgpPublicKey() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 3) { + ref = publicKey_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (publicKeyCase_ == 3) { + publicKey_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return The bytes for asciiArmoredPgpPublicKey. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { + java.lang.Object ref = ""; + if (publicKeyCase_ == 3) { + ref = publicKey_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (publicKeyCase_ == 3) { + publicKey_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @param value The asciiArmoredPgpPublicKey to set. + * @return This builder for chaining. + */ + public Builder setAsciiArmoredPgpPublicKey(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + publicKeyCase_ = 3; + publicKey_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @return This builder for chaining. + */ + public Builder clearAsciiArmoredPgpPublicKey() { + if (publicKeyCase_ == 3) { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+       * ASCII-armored representation of a PGP public key, as the entire output by
+       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
+       * line endings).
+       * When using this field, `id` should be left blank.  The BinAuthz API
+       * handlers will calculate the ID and fill it in automatically.  BinAuthz
+       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
+       * upper-case hex.  If `id` is provided by the caller, it will be
+       * overwritten by the API-calculated ID.
+       * 
+ * + * string ascii_armored_pgp_public_key = 3; + * + * @param value The bytes for asciiArmoredPgpPublicKey to set. + * @return This builder for chaining. + */ + public Builder setAsciiArmoredPgpPublicKeyBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + publicKeyCase_ = 3; + publicKey_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKeyOrBuilder> + pkixPublicKeyBuilder_; + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return Whether the pkixPublicKey field is set. + */ + @java.lang.Override + public boolean hasPkixPublicKey() { + return publicKeyCase_ == 5; + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + * + * @return The pkixPublicKey. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + getPkixPublicKey() { + if (pkixPublicKeyBuilder_ == null) { + if (publicKeyCase_ == 5) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } else { + if (publicKeyCase_ == 5) { + return pkixPublicKeyBuilder_.getMessage(); + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + public Builder setPkixPublicKey( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey value) { + if (pkixPublicKeyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + publicKey_ = value; + onChanged(); + } else { + pkixPublicKeyBuilder_.setMessage(value); + } + publicKeyCase_ = 5; + return this; + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + public Builder setPkixPublicKey( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder + builderForValue) { + if (pkixPublicKeyBuilder_ == null) { + publicKey_ = builderForValue.build(); + onChanged(); + } else { + pkixPublicKeyBuilder_.setMessage(builderForValue.build()); + } + publicKeyCase_ = 5; + return this; + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + public Builder mergePkixPublicKey( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey value) { + if (pkixPublicKeyBuilder_ == null) { + if (publicKeyCase_ == 5 + && publicKey_ + != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance()) { + publicKey_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .newBuilder( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKey) + publicKey_) + .mergeFrom(value) + .buildPartial(); + } else { + publicKey_ = value; + } + onChanged(); + } else { + if (publicKeyCase_ == 5) { + pkixPublicKeyBuilder_.mergeFrom(value); + } + pkixPublicKeyBuilder_.setMessage(value); + } + publicKeyCase_ = 5; + return this; + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + public Builder clearPkixPublicKey() { + if (pkixPublicKeyBuilder_ == null) { + if (publicKeyCase_ == 5) { + publicKeyCase_ = 0; + publicKey_ = null; + onChanged(); + } + } else { + if (publicKeyCase_ == 5) { + publicKeyCase_ = 0; + publicKey_ = null; + } + pkixPublicKeyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder + getPkixPublicKeyBuilder() { + return getPkixPublicKeyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder + getPkixPublicKeyOrBuilder() { + if ((publicKeyCase_ == 5) && (pkixPublicKeyBuilder_ != null)) { + return pkixPublicKeyBuilder_.getMessageOrBuilder(); + } else { + if (publicKeyCase_ == 5) { + return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_; + } + return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } + } + /** + * + * + *
+       * A raw PKIX SubjectPublicKeyInfo format public key.
+       * NOTE: `id` may be explicitly provided by the caller when using this
+       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
+       * blank, a default one will be computed based on the digest of the DER
+       * encoding of the public key.
+       * 
+ * + * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKeyOrBuilder> + getPkixPublicKeyFieldBuilder() { + if (pkixPublicKeyBuilder_ == null) { + if (!(publicKeyCase_ == 5)) { + publicKey_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .getDefaultInstance(); + } + pkixPublicKeyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey + .Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .PkixPublicKeyOrBuilder>( + (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) + publicKey_, + getParentForChildren(), + isClean()); + publicKey_ = null; + } + publicKeyCase_ = 5; + onChanged(); + ; + return pkixPublicKeyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.AttestorPublicKey) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AttestorPublicKey) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AttestorPublicKey parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AttestorPublicKey(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_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/binaryauthorization/v1/re" + + "sources.proto\022#google.cloud.binaryauthor" + + "ization.v1\032\037google/api/field_behavior.pr" + + "oto\032\031google/api/resource.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\034google/api/anno" + + "tations.proto\"\370\014\n\006Policy\022\021\n\004name\030\001 \001(\tB\003" + + "\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022r\n\035global_" + + "policy_evaluation_mode\030\007 \001(\0162F.google.cl" + + "oud.binaryauthorization.v1.Policy.Global" + + "PolicyEvaluationModeB\003\340A\001\022i\n\034admission_w" + + "hitelist_patterns\030\002 \003(\0132>.google.cloud.b" + + "inaryauthorization.v1.AdmissionWhitelist" + + "PatternB\003\340A\001\022l\n\027cluster_admission_rules\030" + + "\003 \003(\0132F.google.cloud.binaryauthorization" + + ".v1.Policy.ClusterAdmissionRulesEntryB\003\340" + + "A\001\022\205\001\n$kubernetes_namespace_admission_ru" + + "les\030\n \003(\0132R.google.cloud.binaryauthoriza" + + "tion.v1.Policy.KubernetesNamespaceAdmiss" + + "ionRulesEntryB\003\340A\001\022\220\001\n*kubernetes_servic" + + "e_account_admission_rules\030\010 \003(\0132W.google" + + ".cloud.binaryauthorization.v1.Policy.Kub" + + "ernetesServiceAccountAdmissionRulesEntry" + + "B\003\340A\001\022\210\001\n&istio_service_identity_admissi" + + "on_rules\030\t \003(\0132S.google.cloud.binaryauth" + + "orization.v1.Policy.IstioServiceIdentity" + + "AdmissionRulesEntryB\003\340A\001\022W\n\026default_admi" + + "ssion_rule\030\004 \001(\01322.google.cloud.binaryau" + + "thorization.v1.AdmissionRuleB\003\340A\002\0224\n\013upd" + + "ate_time\030\005 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\032p\n\032ClusterAdmissionRulesEntry\022\013\n" + + "\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.google.cloud" + + ".binaryauthorization.v1.AdmissionRule:\0028" + + "\001\032|\n&KubernetesNamespaceAdmissionRulesEn" + + "try\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.google" + + ".cloud.binaryauthorization.v1.AdmissionR" + + "ule:\0028\001\032\201\001\n+KubernetesServiceAccountAdmi" + + "ssionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 " + + "\001(\01322.google.cloud.binaryauthorization.v" + + "1.AdmissionRule:\0028\001\032}\n\'IstioServiceIdent" + + "ityAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005v" + + "alue\030\002 \001(\01322.google.cloud.binaryauthoriz" + + "ation.v1.AdmissionRule:\0028\001\"d\n\032GlobalPoli" + + "cyEvaluationMode\022-\n)GLOBAL_POLICY_EVALUA" + + "TION_MODE_UNSPECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007D" + + "ISABLE\020\002:f\352Ac\n)binaryauthorization.googl" + + "eapis.com/Policy\022\031projects/{project}/pol" + + "icy\022\033locations/{location}/policy\"1\n\031Admi" + + "ssionWhitelistPattern\022\024\n\014name_pattern\030\001 " + + "\001(\t\"\332\003\n\rAdmissionRule\022_\n\017evaluation_mode" + + "\030\001 \001(\0162A.google.cloud.binaryauthorizatio" + + "n.v1.AdmissionRule.EvaluationModeB\003\340A\002\022$" + + "\n\027require_attestations_by\030\002 \003(\tB\003\340A\001\022a\n\020" + + "enforcement_mode\030\003 \001(\0162B.google.cloud.bi" + + "naryauthorization.v1.AdmissionRule.Enfor" + + "cementModeB\003\340A\002\"m\n\016EvaluationMode\022\037\n\033EVA" + + "LUATION_MODE_UNSPECIFIED\020\000\022\020\n\014ALWAYS_ALL" + + "OW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013ALWAYS_" + + "DENY\020\003\"p\n\017EnforcementMode\022 \n\034ENFORCEMENT" + + "_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCED_BLOCK_AN" + + "D_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG_ONLY\020\002" + + "\"\267\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013desc" + + "ription\030\006 \001(\tB\003\340A\001\022\\\n\027user_owned_grafeas" + + "_note\030\003 \001(\01329.google.cloud.binaryauthori" + + "zation.v1.UserOwnedGrafeasNoteH\000\0224\n\013upda" + + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "pB\003\340A\003:Y\352AV\n+binaryauthorization.googlea" + + "pis.com/Attestor\022\'projects/{project}/att" + + "estors/{attestor}B\017\n\rattestor_type\"\264\001\n\024U" + + "serOwnedGrafeasNote\022\033\n\016note_reference\030\001 " + + "\001(\tB\003\340A\002\022P\n\013public_keys\030\002 \003(\01326.google.c" + + "loud.binaryauthorization.v1.AttestorPubl" + + "icKeyB\003\340A\001\022-\n delegation_service_account" + + "_email\030\003 \001(\tB\003\340A\003\"\277\004\n\rPkixPublicKey\022\026\n\016p" + + "ublic_key_pem\030\001 \001(\t\022b\n\023signature_algorit" + + "hm\030\002 \001(\0162E.google.cloud.binaryauthorizat" + + "ion.v1.PkixPublicKey.SignatureAlgorithm\"" + + "\261\003\n\022SignatureAlgorithm\022#\n\037SIGNATURE_ALGO" + + "RITHM_UNSPECIFIED\020\000\022\027\n\023RSA_PSS_2048_SHA2" + + "56\020\001\022\027\n\023RSA_PSS_3072_SHA256\020\002\022\027\n\023RSA_PSS" + + "_4096_SHA256\020\003\022\027\n\023RSA_PSS_4096_SHA512\020\004\022" + + "\036\n\032RSA_SIGN_PKCS1_2048_SHA256\020\005\022\036\n\032RSA_S" + + "IGN_PKCS1_3072_SHA256\020\006\022\036\n\032RSA_SIGN_PKCS" + + "1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_PKCS1_4096_S" + + "HA512\020\010\022\025\n\021ECDSA_P256_SHA256\020\t\022\027\n\023EC_SIG" + + "N_P256_SHA256\020\t\022\025\n\021ECDSA_P384_SHA384\020\n\022\027" + + "\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021ECDSA_P521_SH" + + "A512\020\013\022\027\n\023EC_SIGN_P521_SHA512\020\013\032\002\020\001\"\272\001\n\021" + + "AttestorPublicKey\022\024\n\007comment\030\001 \001(\tB\003\340A\001\022" + + "\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored_pgp_public_" + + "key\030\003 \001(\tH\000\022M\n\017pkix_public_key\030\005 \001(\01322.g" + + "oogle.cloud.binaryauthorization.v1.PkixP" + + "ublicKeyH\000B\014\n\npublic_keyB\211\002\n5com.google." + + "protos.google.cloud.binaryauthorization." + + "v1P\000ZVgoogle.golang.org/genproto/googlea" + + "pis/cloud/binaryauthorization/v1;binarya" + + "uthorization\370\001\001\252\002#Google.Cloud.BinaryAut" + + "horization.V1\312\002#Google\\Cloud\\BinaryAutho" + + "rization\\V1\352\002&Google::Cloud::BinaryAutho" + + "rization::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor, + new java.lang.String[] { + "Name", + "Description", + "GlobalPolicyEvaluationMode", + "AdmissionWhitelistPatterns", + "ClusterAdmissionRules", + "KubernetesNamespaceAdmissionRules", + "KubernetesServiceAccountAdmissionRules", + "IstioServiceIdentityAdmissionRules", + "DefaultAdmissionRule", + "UpdateTime", + }); + internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor, + new java.lang.String[] { + "NamePattern", + }); + internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor, + new java.lang.String[] { + "EvaluationMode", "RequireAttestationsBy", "EnforcementMode", + }); + internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor, + new java.lang.String[] { + "Name", "Description", "UserOwnedGrafeasNote", "UpdateTime", "AttestorType", + }); + internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor, + new java.lang.String[] { + "NoteReference", "PublicKeys", "DelegationServiceAccountEmail", + }); + internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor, + new java.lang.String[] { + "PublicKeyPem", "SignatureAlgorithm", + }); + internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor, + new java.lang.String[] { + "Comment", "Id", "AsciiArmoredPgpPublicKey", "PkixPublicKey", "PublicKey", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java new file mode 100644 index 00000000..ee36ba6e --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java @@ -0,0 +1,11272 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/binaryauthorization/v1/service.proto + +package com.google.protos.google.cloud.binaryauthorization.v1; + +public final class Service { + private Service() {} + + 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 GetPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
+     * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.GetPolicy][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetPolicyRequest} + */ + public static final class GetPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetPolicyRequest) + GetPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetPolicyRequest.newBuilder() to construct. + private GetPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetPolicyRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.Builder + .class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
+     * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
+     * 
+ * + * + * 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.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) 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.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.GetPolicy][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetPolicyRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + .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.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+       * in the format `projects/*/policy`.
+       * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+       * in the format `projects/*/policy`.
+       * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+       * in the format `projects/*/policy`.
+       * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+       * in the format `projects/*/policy`.
+       * 
+ * + * + * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
+       * in the format `projects/*/policy`.
+       * 
+ * + * + * 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.binaryauthorization.v1.GetPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetPolicyRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetPolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdatePolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policy field is set. + */ + boolean hasPolicy(); + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy(); + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder + getPolicyOrBuilder(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.UpdatePolicy][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdatePolicyRequest} + */ + public static final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) + UpdatePolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePolicyRequest.newBuilder() to construct. + private UpdatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePolicyRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdatePolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdatePolicyRequest( + 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.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder + subBuilder = null; + if (policy_ != null) { + subBuilder = policy_.toBuilder(); + } + policy_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(policy_); + policy_ = 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .Builder.class); + } + + public static final int POLICY_FIELD_NUMBER = 1; + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy policy_; + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policy field is set. + */ + @java.lang.Override + public boolean hasPolicy() { + return policy_ != null; + } + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy() { + return policy_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance() + : policy_; + } + /** + * + * + *
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder + getPolicyOrBuilder() { + return getPolicy(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (policy_ != null) { + output.writeMessage(1, getPolicy()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (policy_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) obj; + + if (hasPolicy() != other.hasPolicy()) return false; + if (hasPolicy()) { + if (!getPolicy().equals(other.getPolicy())) return false; + } + if (!unknownFields.equals(other.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 (hasPolicy()) { + hash = (37 * hash) + POLICY_FIELD_NUMBER; + hash = (53 * hash) + getPolicy().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.UpdatePolicy][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdatePolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (policyBuilder_ == null) { + policy_ = null; + } else { + policy_ = null; + policyBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest( + this); + if (policyBuilder_ == null) { + result.policy_ = policy_; + } else { + result.policy_ = policyBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + .getDefaultInstance()) return this; + if (other.hasPolicy()) { + mergePolicy(other.getPolicy()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy policy_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder> + policyBuilder_; + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the policy field is set. + */ + public boolean hasPolicy() { + return policyBuilder_ != null || policy_ != null; + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The policy. + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy() { + if (policyBuilder_ == null) { + return policy_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance() + : policy_; + } else { + return policyBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy value) { + if (policyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + policy_ = value; + onChanged(); + } else { + policyBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setPolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder + builderForValue) { + if (policyBuilder_ == null) { + policy_ = builderForValue.build(); + onChanged(); + } else { + policyBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergePolicy( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy value) { + if (policyBuilder_ == null) { + if (policy_ != null) { + policy_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.newBuilder( + policy_) + .mergeFrom(value) + .buildPartial(); + } else { + policy_ = value; + } + onChanged(); + } else { + policyBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearPolicy() { + if (policyBuilder_ == null) { + policy_ = null; + onChanged(); + } else { + policy_ = null; + policyBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder + getPolicyBuilder() { + + onChanged(); + return getPolicyFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder + getPolicyOrBuilder() { + if (policyBuilder_ != null) { + return policyBuilder_.getMessageOrBuilder(); + } else { + return policy_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy + .getDefaultInstance() + : policy_; + } + } + /** + * + * + *
+       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
+       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
+       * the request URL, in the format `projects/*/policy`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder> + getPolicyFieldBuilder() { + if (policyBuilder_ == null) { + policyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder>( + getPolicy(), getParentForChildren(), isClean()); + policy_ = null; + } + return policyBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdatePolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdatePolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreateAttestorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.CreateAttestorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+     * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestorId. + */ + java.lang.String getAttestorId(); + /** + * + * + *
+     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+     * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestorId. + */ + com.google.protobuf.ByteString getAttestorIdBytes(); + + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + boolean hasAttestor(); + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor(); + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.CreateAttestor][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.CreateAttestorRequest} + */ + public static final class CreateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.CreateAttestorRequest) + CreateAttestorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateAttestorRequest.newBuilder() to construct. + private CreateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateAttestorRequest() { + parent_ = ""; + attestorId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateAttestorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateAttestorRequest( + 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(); + + attestorId_ = s; + break; + } + case 26: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + subBuilder = null; + if (attestor_ != null) { + subBuilder = attestor_.toBuilder(); + } + attestor_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(attestor_); + attestor_ = 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * + * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * + * 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 ATTESTOR_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object attestorId_; + /** + * + * + *
+     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+     * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestorId. + */ + @java.lang.Override + public java.lang.String getAttestorId() { + java.lang.Object ref = attestorId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attestorId_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+     * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestorId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttestorIdBytes() { + java.lang.Object ref = attestorId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attestorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTESTOR_FIELD_NUMBER = 3; + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + @java.lang.Override + public boolean hasAttestor() { + return attestor_ != null; + } + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor() { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } + /** + * + * + *
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder() { + return getAttestor(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (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 (!getAttestorIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attestorId_); + } + if (attestor_ != null) { + output.writeMessage(3, getAttestor()); + } + 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 (!getAttestorIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attestorId_); + } + if (attestor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttestor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAttestorId().equals(other.getAttestorId())) return false; + if (hasAttestor() != other.hasAttestor()) return false; + if (hasAttestor()) { + if (!getAttestor().equals(other.getAttestor())) return false; + } + if (!unknownFields.equals(other.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) + ATTESTOR_ID_FIELD_NUMBER; + hash = (53 * hash) + getAttestorId().hashCode(); + if (hasAttestor()) { + hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; + hash = (53 * hash) + getAttestor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.CreateAttestor][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.CreateAttestorRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.CreateAttestorRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + attestorId_ = ""; + + if (attestorBuilder_ == null) { + attestor_ = null; + } else { + attestor_ = null; + attestorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest( + this); + result.parent_ = parent_; + result.attestorId_ = attestorId_; + if (attestorBuilder_ == null) { + result.attestor_ = attestor_; + } else { + result.attestor_ = attestorBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getAttestorId().isEmpty()) { + attestorId_ = other.attestorId_; + onChanged(); + } + if (other.hasAttestor()) { + mergeAttestor(other.getAttestor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * + * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * + * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * + * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * + * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * + * 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 attestorId_ = ""; + /** + * + * + *
+       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+       * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestorId. + */ + public java.lang.String getAttestorId() { + java.lang.Object ref = attestorId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attestorId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+       * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestorId. + */ + public com.google.protobuf.ByteString getAttestorIdBytes() { + java.lang.Object ref = attestorId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attestorId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+       * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The attestorId to set. + * @return This builder for chaining. + */ + public Builder setAttestorId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attestorId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+       * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAttestorId() { + + attestorId_ = getDefaultInstance().getAttestorId(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
+       * 
+ * + * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for attestorId to set. + * @return This builder for chaining. + */ + public Builder setAttestorIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attestorId_ = value; + onChanged(); + return this; + } + + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + attestorBuilder_; + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + public boolean hasAttestor() { + return attestorBuilder_ != null || attestor_ != null; + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + getAttestor() { + if (attestorBuilder_ == null) { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } else { + return attestorBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attestor_ = value; + onChanged(); + } else { + attestorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + builderForValue) { + if (attestorBuilder_ == null) { + attestor_ = builderForValue.build(); + onChanged(); + } else { + attestorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorBuilder_ == null) { + if (attestor_ != null) { + attestor_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder( + attestor_) + .mergeFrom(value) + .buildPartial(); + } else { + attestor_ = value; + } + onChanged(); + } else { + attestorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAttestor() { + if (attestorBuilder_ == null) { + attestor_ = null; + onChanged(); + } else { + attestor_ = null; + attestorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + getAttestorBuilder() { + + onChanged(); + return getAttestorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder() { + if (attestorBuilder_ != null) { + return attestorBuilder_.getMessageOrBuilder(); + } else { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } + } + /** + * + * + *
+       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
+       * in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorFieldBuilder() { + if (attestorBuilder_ == null) { + attestorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorOrBuilder>(getAttestor(), getParentForChildren(), isClean()); + attestor_ = null; + } + return attestorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.CreateAttestorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.CreateAttestorRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .CreateAttestorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateAttestorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateAttestorRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetAttestorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetAttestorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.GetAttestor][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetAttestorRequest} + */ + public static final class GetAttestorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetAttestorRequest) + GetAttestorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetAttestorRequest.newBuilder() to construct. + private GetAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetAttestorRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetAttestorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetAttestorRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * 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.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) 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.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.GetAttestor][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetAttestorRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetAttestorRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + .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.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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.binaryauthorization.v1.GetAttestorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetAttestorRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetAttestorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetAttestorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetAttestorRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdateAttestorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + boolean hasAttestor(); + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor(); + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.UpdateAttestor][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdateAttestorRequest} + */ + public static final class UpdateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) + UpdateAttestorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateAttestorRequest.newBuilder() to construct. + private UpdateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateAttestorRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateAttestorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateAttestorRequest( + 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.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + subBuilder = null; + if (attestor_ != null) { + subBuilder = attestor_.toBuilder(); + } + attestor_ = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(attestor_); + attestor_ = 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .Builder.class); + } + + public static final int ATTESTOR_FIELD_NUMBER = 1; + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + @java.lang.Override + public boolean hasAttestor() { + return attestor_ != null; + } + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor() { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } + /** + * + * + *
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder() { + return getAttestor(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (attestor_ != null) { + output.writeMessage(1, getAttestor()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (attestor_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAttestor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) obj; + + if (hasAttestor() != other.hasAttestor()) return false; + if (hasAttestor()) { + if (!getAttestor().equals(other.getAttestor())) return false; + } + if (!unknownFields.equals(other.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 (hasAttestor()) { + hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; + hash = (53 * hash) + getAttestor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.UpdateAttestor][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdateAttestorRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (attestorBuilder_ == null) { + attestor_ = null; + } else { + attestor_ = null; + attestorBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest( + this); + if (attestorBuilder_ == null) { + result.attestor_ = attestor_; + } else { + result.attestor_ = attestorBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + .getDefaultInstance()) return this; + if (other.hasAttestor()) { + mergeAttestor(other.getAttestor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + attestorBuilder_; + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestor field is set. + */ + public boolean hasAttestor() { + return attestorBuilder_ != null || attestor_ != null; + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestor. + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + getAttestor() { + if (attestorBuilder_ == null) { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } else { + return attestorBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attestor_ = value; + onChanged(); + } else { + attestorBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + builderForValue) { + if (attestorBuilder_ == null) { + attestor_ = builderForValue.build(); + onChanged(); + } else { + attestorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAttestor( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorBuilder_ == null) { + if (attestor_ != null) { + attestor_ = + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder( + attestor_) + .mergeFrom(value) + .buildPartial(); + } else { + attestor_ = value; + } + onChanged(); + } else { + attestorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAttestor() { + if (attestorBuilder_ == null) { + attestor_ = null; + onChanged(); + } else { + attestor_ = null; + attestorBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + getAttestorBuilder() { + + onChanged(); + return getAttestorFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorOrBuilder() { + if (attestorBuilder_ != null) { + return attestorBuilder_.getMessageOrBuilder(); + } else { + return attestor_ == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance() + : attestor_; + } + } + /** + * + * + *
+       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
+       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
+       * in the request URL, in the format `projects/*/attestors/*`.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorFieldBuilder() { + if (attestorBuilder_ == null) { + attestorBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorOrBuilder>(getAttestor(), getParentForChildren(), isClean()); + attestor_ = null; + } + return attestorBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .UpdateAttestorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateAttestorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateAttestorRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListAttestorsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ListAttestorsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the project associated with the
+     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+     * Required. The resource name of the project associated with the
+     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+     * Requested page size. The server may return fewer results than requested. If
+     * unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+     * A token identifying a page of results the server should return. Typically,
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+     * A token identifying a page of results the server should return. Typically,
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.ListAttestors][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsRequest} + */ + public static final class ListAttestorsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ListAttestorsRequest) + ListAttestorsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAttestorsRequest.newBuilder() to construct. + private ListAttestorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAttestorsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAttestorsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAttestorsRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+     * Required. The resource name of the project associated with the
+     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+     * 
+ * + * + * 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 project associated with the
+     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+     * 
+ * + * + * 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_; + /** + * + * + *
+     * Requested page size. The server may return fewer results than requested. If
+     * unspecified, the server will pick an appropriate default.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+     * A token identifying a page of results the server should return. Typically,
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A token identifying a page of results the server should return. Typically,
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
+     * 
+ * + * 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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) 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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.ListAttestors][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ListAttestorsRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + .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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+       * Required. The resource name of the project associated with the
+       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+       * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the project associated with the
+       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+       * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the project associated with the
+       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+       * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the project associated with the
+       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+       * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the project associated with the
+       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
+       * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+       * Requested page size. The server may return fewer results than requested. If
+       * unspecified, the server will pick an appropriate default.
+       * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+       * Requested page size. The server may return fewer results than requested. If
+       * unspecified, the server will pick an appropriate default.
+       * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Requested page size. The server may return fewer results than requested. If
+       * unspecified, the server will pick an appropriate default.
+       * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+       * A token identifying a page of results the server should return. Typically,
+       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+       * from the previous call to the `ListAttestors` method.
+       * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A token identifying a page of results the server should return. Typically,
+       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+       * from the previous call to the `ListAttestors` method.
+       * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A token identifying a page of results the server should return. Typically,
+       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+       * from the previous call to the `ListAttestors` method.
+       * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A token identifying a page of results the server should return. Typically,
+       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+       * from the previous call to the `ListAttestors` method.
+       * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * A token identifying a page of results the server should return. Typically,
+       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
+       * from the previous call to the `ListAttestors` method.
+       * 
+ * + * 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.binaryauthorization.v1.ListAttestorsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ListAttestorsRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttestorsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAttestorsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListAttestorsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ListAttestorsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + java.util.List + getAttestorsList(); + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( + int index); + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + int getAttestorsCount(); + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorsOrBuilderList(); + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorsOrBuilder(int index); + + /** + * + * + *
+     * A token to retrieve the next page of results. Pass this value in the
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+     * A token to retrieve the next page of results. Pass this value in the
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); + } + /** + * + * + *
+   * Response message for [BinauthzManagementService.ListAttestors][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsResponse} + */ + public static final class ListAttestorsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ListAttestorsResponse) + ListAttestorsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListAttestorsResponse.newBuilder() to construct. + private ListAttestorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListAttestorsResponse() { + attestors_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListAttestorsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListAttestorsResponse( + 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)) { + attestors_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .Attestor>(); + mutable_bitField0_ |= 0x00000001; + } + attestors_.add( + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .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)) { + attestors_ = java.util.Collections.unmodifiableList(attestors_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .Builder.class); + } + + public static final int ATTESTORS_FIELD_NUMBER = 1; + private java.util.List + attestors_; + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + @java.lang.Override + public java.util.List + getAttestorsList() { + return attestors_; + } + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + @java.lang.Override + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorsOrBuilderList() { + return attestors_; + } + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + @java.lang.Override + public int getAttestorsCount() { + return attestors_.size(); + } + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( + int index) { + return attestors_.get(index); + } + /** + * + * + *
+     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+     * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorsOrBuilder(int index) { + return attestors_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+     * A token to retrieve the next page of results. Pass this value in the
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results. Pass this value in the
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < attestors_.size(); i++) { + output.writeMessage(1, attestors_.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 < attestors_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attestors_.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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) obj; + + if (!getAttestorsList().equals(other.getAttestorsList())) 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 (getAttestorsCount() > 0) { + hash = (37 * hash) + ATTESTORS_FIELD_NUMBER; + hash = (53 * hash) + getAttestorsList().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.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Response message for [BinauthzManagementService.ListAttestors][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ListAttestorsResponse) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAttestorsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (attestorsBuilder_ == null) { + attestors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + attestorsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse( + this); + int from_bitField0_ = bitField0_; + if (attestorsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + attestors_ = java.util.Collections.unmodifiableList(attestors_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.attestors_ = attestors_; + } else { + result.attestors_ = attestorsBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + .getDefaultInstance()) return this; + if (attestorsBuilder_ == null) { + if (!other.attestors_.isEmpty()) { + if (attestors_.isEmpty()) { + attestors_ = other.attestors_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAttestorsIsMutable(); + attestors_.addAll(other.attestors_); + } + onChanged(); + } + } else { + if (!other.attestors_.isEmpty()) { + if (attestorsBuilder_.isEmpty()) { + attestorsBuilder_.dispose(); + attestorsBuilder_ = null; + attestors_ = other.attestors_; + bitField0_ = (bitField0_ & ~0x00000001); + attestorsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAttestorsFieldBuilder() + : null; + } else { + attestorsBuilder_.addAllMessages(other.attestors_); + } + } + } + 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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + attestors_ = java.util.Collections.emptyList(); + + private void ensureAttestorsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + attestors_ = + new java.util.ArrayList< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( + attestors_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + attestorsBuilder_; + + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + getAttestorsList() { + if (attestorsBuilder_ == null) { + return java.util.Collections.unmodifiableList(attestors_); + } else { + return attestorsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public int getAttestorsCount() { + if (attestorsBuilder_ == null) { + return attestors_.size(); + } else { + return attestorsBuilder_.getCount(); + } + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( + int index) { + if (attestorsBuilder_ == null) { + return attestors_.get(index); + } else { + return attestorsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder setAttestors( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttestorsIsMutable(); + attestors_.set(index, value); + onChanged(); + } else { + attestorsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder setAttestors( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + builderForValue) { + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.set(index, builderForValue.build()); + onChanged(); + } else { + attestorsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder addAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttestorsIsMutable(); + attestors_.add(value); + onChanged(); + } else { + attestorsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder addAttestors( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { + if (attestorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttestorsIsMutable(); + attestors_.add(index, value); + onChanged(); + } else { + attestorsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder addAttestors( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + builderForValue) { + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.add(builderForValue.build()); + onChanged(); + } else { + attestorsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder addAttestors( + int index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + builderForValue) { + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.add(index, builderForValue.build()); + onChanged(); + } else { + attestorsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder addAllAttestors( + java.lang.Iterable< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> + values) { + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attestors_); + onChanged(); + } else { + attestorsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder clearAttestors() { + if (attestorsBuilder_ == null) { + attestors_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + attestorsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public Builder removeAttestors(int index) { + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.remove(index); + onChanged(); + } else { + attestorsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + getAttestorsBuilder(int index) { + return getAttestorsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder + getAttestorsOrBuilder(int index) { + if (attestorsBuilder_ == null) { + return attestors_.get(index); + } else { + return attestorsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public java.util.List< + ? extends + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorsOrBuilderList() { + if (attestorsBuilder_ != null) { + return attestorsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(attestors_); + } + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + addAttestorsBuilder() { + return getAttestorsFieldBuilder() + .addBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder + addAttestorsBuilder(int index) { + return getAttestorsFieldBuilder() + .addBuilder( + index, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .getDefaultInstance()); + } + /** + * + * + *
+       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
+       * 
+ * + * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; + */ + public java.util.List< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder> + getAttestorsBuilderList() { + return getAttestorsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> + getAttestorsFieldBuilder() { + if (attestorsBuilder_ == null) { + attestorsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorOrBuilder>( + attestors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + attestors_ = null; + } + return attestorsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+       * A token to retrieve the next page of results. Pass this value in the
+       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+       * `ListAttestors` method to retrieve the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * A token to retrieve the next page of results. Pass this value in the
+       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+       * `ListAttestors` method to retrieve the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * A token to retrieve the next page of results. Pass this value in the
+       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+       * `ListAttestors` method to retrieve the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * A token to retrieve the next page of results. Pass this value in the
+       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+       * `ListAttestors` method to retrieve the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+       * A token to retrieve the next page of results. Pass this value in the
+       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
+       * `ListAttestors` method to retrieve the next page of results.
+       * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.ListAttestorsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ListAttestorsResponse) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ListAttestorsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListAttestorsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListAttestorsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeleteAttestorRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request message for [BinauthzManagementService.DeleteAttestor][].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.DeleteAttestorRequest} + */ + public static final class DeleteAttestorRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) + DeleteAttestorRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteAttestorRequest.newBuilder() to construct. + private DeleteAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteAttestorRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteAttestorRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteAttestorRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * + * 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.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) 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.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for [BinauthzManagementService.DeleteAttestor][].
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.DeleteAttestorRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + .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.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * + * 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.binaryauthorization.v1.DeleteAttestorRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .DeleteAttestorRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteAttestorRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteAttestorRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetSystemPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+     * Required. The resource name, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + } + /** + * + * + *
+   * Request to read the current system policy.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetSystemPolicyRequest} + */ + public static final class GetSystemPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) + GetSystemPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSystemPolicyRequest.newBuilder() to construct. + private GetSystemPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSystemPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSystemPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetSystemPolicyRequest( + 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+     * Required. The resource name, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) + 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.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 read the current system policy.
+     * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.GetSystemPolicyRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .class, + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest(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.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + .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.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+       * Required. The resource name, in the format `locations/*/policy`.
+       * Note that the system policy is not associated with a project.
+       * 
+ * + * + * 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, in the format `locations/*/policy`.
+       * Note that the system policy is not associated with a project.
+       * 
+ * + * + * 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, in the format `locations/*/policy`.
+       * Note that the system policy is not associated with a project.
+       * 
+ * + * + * 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, in the format `locations/*/policy`.
+       * Note that the system policy is not associated with a project.
+       * 
+ * + * + * 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, in the format `locations/*/policy`.
+       * Note that the system policy is not associated with a project.
+       * 
+ * + * + * 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.binaryauthorization.v1.GetSystemPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .GetSystemPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSystemPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetSystemPolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ValidateAttestationOccurrenceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+     * [occurrence][grafeas.v1.Occurrence], in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestor. + */ + java.lang.String getAttestor(); + /** + * + * + *
+     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+     * [occurrence][grafeas.v1.Occurrence], in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestor. + */ + com.google.protobuf.ByteString getAttestorBytes(); + + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestation field is set. + */ + boolean hasAttestation(); + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestation. + */ + io.grafeas.v1.AttestationOccurrence getAttestation(); + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); + + /** + * + * + *
+     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+     * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceNote. + */ + java.lang.String getOccurrenceNote(); + /** + * + * + *
+     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+     * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceNote. + */ + com.google.protobuf.ByteString getOccurrenceNoteBytes(); + + /** + * + * + *
+     * Required. The URI of the artifact (e.g. container image) that is the
+     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+     * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceResourceUri. + */ + java.lang.String getOccurrenceResourceUri(); + /** + * + * + *
+     * Required. The URI of the artifact (e.g. container image) that is the
+     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+     * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceResourceUri. + */ + com.google.protobuf.ByteString getOccurrenceResourceUriBytes(); + } + /** + * + * + *
+   * Request message for
+   * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest} + */ + public static final class ValidateAttestationOccurrenceRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) + ValidateAttestationOccurrenceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateAttestationOccurrenceRequest.newBuilder() to construct. + private ValidateAttestationOccurrenceRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateAttestationOccurrenceRequest() { + attestor_ = ""; + occurrenceNote_ = ""; + occurrenceResourceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateAttestationOccurrenceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateAttestationOccurrenceRequest( + 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(); + + attestor_ = s; + break; + } + case 18: + { + io.grafeas.v1.AttestationOccurrence.Builder subBuilder = null; + if (attestation_ != null) { + subBuilder = attestation_.toBuilder(); + } + attestation_ = + input.readMessage( + io.grafeas.v1.AttestationOccurrence.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(attestation_); + attestation_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + occurrenceNote_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + occurrenceResourceUri_ = 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.class, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.Builder.class); + } + + public static final int ATTESTOR_FIELD_NUMBER = 1; + private volatile java.lang.Object attestor_; + /** + * + * + *
+     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+     * [occurrence][grafeas.v1.Occurrence], in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestor. + */ + @java.lang.Override + public java.lang.String getAttestor() { + java.lang.Object ref = attestor_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attestor_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+     * [occurrence][grafeas.v1.Occurrence], in the format
+     * `projects/*/attestors/*`.
+     * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestor. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttestorBytes() { + java.lang.Object ref = attestor_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attestor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTESTATION_FIELD_NUMBER = 2; + private io.grafeas.v1.AttestationOccurrence attestation_; + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestation field is set. + */ + @java.lang.Override + public boolean hasAttestation() { + return attestation_ != null; + } + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestation. + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrence getAttestation() { + return attestation_ == null + ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() + : attestation_; + } + /** + * + * + *
+     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+     * be checked that it can be verified by the Attestor. It does not have to be
+     * an existing entity in Container Analysis. It must otherwise be a valid
+     * AttestationOccurrence.
+     * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + return getAttestation(); + } + + public static final int OCCURRENCE_NOTE_FIELD_NUMBER = 3; + private volatile java.lang.Object occurrenceNote_; + /** + * + * + *
+     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+     * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceNote. + */ + @java.lang.Override + public java.lang.String getOccurrenceNote() { + java.lang.Object ref = occurrenceNote_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + occurrenceNote_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+     * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceNote. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOccurrenceNoteBytes() { + java.lang.Object ref = occurrenceNote_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + occurrenceNote_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OCCURRENCE_RESOURCE_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object occurrenceResourceUri_; + /** + * + * + *
+     * Required. The URI of the artifact (e.g. container image) that is the
+     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+     * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceResourceUri. + */ + @java.lang.Override + public java.lang.String getOccurrenceResourceUri() { + java.lang.Object ref = occurrenceResourceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + occurrenceResourceUri_ = s; + return s; + } + } + /** + * + * + *
+     * Required. The URI of the artifact (e.g. container image) that is the
+     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+     * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceResourceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOccurrenceResourceUriBytes() { + java.lang.Object ref = occurrenceResourceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + occurrenceResourceUri_ = 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 (!getAttestorBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attestor_); + } + if (attestation_ != null) { + output.writeMessage(2, getAttestation()); + } + if (!getOccurrenceNoteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, occurrenceNote_); + } + if (!getOccurrenceResourceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, occurrenceResourceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAttestorBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attestor_); + } + if (attestation_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAttestation()); + } + if (!getOccurrenceNoteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, occurrenceNote_); + } + if (!getOccurrenceResourceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, occurrenceResourceUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest) + obj; + + if (!getAttestor().equals(other.getAttestor())) return false; + if (hasAttestation() != other.hasAttestation()) return false; + if (hasAttestation()) { + if (!getAttestation().equals(other.getAttestation())) return false; + } + if (!getOccurrenceNote().equals(other.getOccurrenceNote())) return false; + if (!getOccurrenceResourceUri().equals(other.getOccurrenceResourceUri())) return false; + if (!unknownFields.equals(other.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) + ATTESTOR_FIELD_NUMBER; + hash = (53 * hash) + getAttestor().hashCode(); + if (hasAttestation()) { + hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; + hash = (53 * hash) + getAttestation().hashCode(); + } + hash = (37 * hash) + OCCURRENCE_NOTE_FIELD_NUMBER; + hash = (53 * hash) + getOccurrenceNote().hashCode(); + hash = (37 * hash) + OCCURRENCE_RESOURCE_URI_FIELD_NUMBER; + hash = (53 * hash) + getOccurrenceResourceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Request message for
+     * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
+     * 
+ * + * Protobuf type {@code + * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.class, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + attestor_ = ""; + + if (attestationBuilder_ == null) { + attestation_ = null; + } else { + attestation_ = null; + attestationBuilder_ = null; + } + occurrenceNote_ = ""; + + occurrenceResourceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest(this); + result.attestor_ = attestor_; + if (attestationBuilder_ == null) { + result.attestation_ = attestation_; + } else { + result.attestation_ = attestationBuilder_.build(); + } + result.occurrenceNote_ = occurrenceNote_; + result.occurrenceResourceUri_ = occurrenceResourceUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest.getDefaultInstance()) return this; + if (!other.getAttestor().isEmpty()) { + attestor_ = other.attestor_; + onChanged(); + } + if (other.hasAttestation()) { + mergeAttestation(other.getAttestation()); + } + if (!other.getOccurrenceNote().isEmpty()) { + occurrenceNote_ = other.occurrenceNote_; + onChanged(); + } + if (!other.getOccurrenceResourceUri().isEmpty()) { + occurrenceResourceUri_ = other.occurrenceResourceUri_; + 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.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object attestor_ = ""; + /** + * + * + *
+       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+       * [occurrence][grafeas.v1.Occurrence], in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The attestor. + */ + public java.lang.String getAttestor() { + java.lang.Object ref = attestor_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attestor_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+       * [occurrence][grafeas.v1.Occurrence], in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for attestor. + */ + public com.google.protobuf.ByteString getAttestorBytes() { + java.lang.Object ref = attestor_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attestor_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+       * [occurrence][grafeas.v1.Occurrence], in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The attestor to set. + * @return This builder for chaining. + */ + public Builder setAttestor(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attestor_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+       * [occurrence][grafeas.v1.Occurrence], in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAttestor() { + + attestor_ = getDefaultInstance().getAttestor(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
+       * [occurrence][grafeas.v1.Occurrence], in the format
+       * `projects/*/attestors/*`.
+       * 
+ * + * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for attestor to set. + * @return This builder for chaining. + */ + public Builder setAttestorBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attestor_ = value; + onChanged(); + return this; + } + + private io.grafeas.v1.AttestationOccurrence attestation_; + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, + io.grafeas.v1.AttestationOccurrence.Builder, + io.grafeas.v1.AttestationOccurrenceOrBuilder> + attestationBuilder_; + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the attestation field is set. + */ + public boolean hasAttestation() { + return attestationBuilder_ != null || attestation_ != null; + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The attestation. + */ + public io.grafeas.v1.AttestationOccurrence getAttestation() { + if (attestationBuilder_ == null) { + return attestation_ == null + ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() + : attestation_; + } else { + return attestationBuilder_.getMessage(); + } + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + attestation_ = value; + onChanged(); + } else { + attestationBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setAttestation(io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { + if (attestationBuilder_ == null) { + attestation_ = builderForValue.build(); + onChanged(); + } else { + attestationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { + if (attestationBuilder_ == null) { + if (attestation_ != null) { + attestation_ = + io.grafeas.v1.AttestationOccurrence.newBuilder(attestation_) + .mergeFrom(value) + .buildPartial(); + } else { + attestation_ = value; + } + onChanged(); + } else { + attestationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearAttestation() { + if (attestationBuilder_ == null) { + attestation_ = null; + onChanged(); + } else { + attestation_ = null; + attestationBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { + + onChanged(); + return getAttestationFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { + if (attestationBuilder_ != null) { + return attestationBuilder_.getMessageOrBuilder(); + } else { + return attestation_ == null + ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() + : attestation_; + } + } + /** + * + * + *
+       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
+       * be checked that it can be verified by the Attestor. It does not have to be
+       * an existing entity in Container Analysis. It must otherwise be a valid
+       * AttestationOccurrence.
+       * 
+ * + * + * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, + io.grafeas.v1.AttestationOccurrence.Builder, + io.grafeas.v1.AttestationOccurrenceOrBuilder> + getAttestationFieldBuilder() { + if (attestationBuilder_ == null) { + attestationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + io.grafeas.v1.AttestationOccurrence, + io.grafeas.v1.AttestationOccurrence.Builder, + io.grafeas.v1.AttestationOccurrenceOrBuilder>( + getAttestation(), getParentForChildren(), isClean()); + attestation_ = null; + } + return attestationBuilder_; + } + + private java.lang.Object occurrenceNote_ = ""; + /** + * + * + *
+       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+       * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceNote. + */ + public java.lang.String getOccurrenceNote() { + java.lang.Object ref = occurrenceNote_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + occurrenceNote_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+       * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceNote. + */ + public com.google.protobuf.ByteString getOccurrenceNoteBytes() { + java.lang.Object ref = occurrenceNote_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + occurrenceNote_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+       * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The occurrenceNote to set. + * @return This builder for chaining. + */ + public Builder setOccurrenceNote(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + occurrenceNote_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+       * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOccurrenceNote() { + + occurrenceNote_ = getDefaultInstance().getOccurrenceNote(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
+       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
+       * 
+ * + * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for occurrenceNote to set. + * @return This builder for chaining. + */ + public Builder setOccurrenceNoteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + occurrenceNote_ = value; + onChanged(); + return this; + } + + private java.lang.Object occurrenceResourceUri_ = ""; + /** + * + * + *
+       * Required. The URI of the artifact (e.g. container image) that is the
+       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+       * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The occurrenceResourceUri. + */ + public java.lang.String getOccurrenceResourceUri() { + java.lang.Object ref = occurrenceResourceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + occurrenceResourceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. The URI of the artifact (e.g. container image) that is the
+       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+       * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for occurrenceResourceUri. + */ + public com.google.protobuf.ByteString getOccurrenceResourceUriBytes() { + java.lang.Object ref = occurrenceResourceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + occurrenceResourceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. The URI of the artifact (e.g. container image) that is the
+       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+       * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The occurrenceResourceUri to set. + * @return This builder for chaining. + */ + public Builder setOccurrenceResourceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + occurrenceResourceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The URI of the artifact (e.g. container image) that is the
+       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+       * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOccurrenceResourceUri() { + + occurrenceResourceUri_ = getDefaultInstance().getOccurrenceResourceUri(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. The URI of the artifact (e.g. container image) that is the
+       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
+       * 
+ * + * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for occurrenceResourceUri to set. + * @return This builder for chaining. + */ + public Builder setOccurrenceResourceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + occurrenceResourceUri_ = 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.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateAttestationOccurrenceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateAttestationOccurrenceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ValidateAttestationOccurrenceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The result of the Attestation validation.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The enum numeric value on the wire for result. + */ + int getResultValue(); + /** + * + * + *
+     * The result of the Attestation validation.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The result. + */ + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + getResult(); + + /** + * + * + *
+     * The reason for denial if the Attestation couldn't be validated.
+     * 
+ * + * string denial_reason = 2; + * + * @return The denialReason. + */ + java.lang.String getDenialReason(); + /** + * + * + *
+     * The reason for denial if the Attestation couldn't be validated.
+     * 
+ * + * string denial_reason = 2; + * + * @return The bytes for denialReason. + */ + com.google.protobuf.ByteString getDenialReasonBytes(); + } + /** + * + * + *
+   * Response message for
+   * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse} + */ + public static final class ValidateAttestationOccurrenceResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) + ValidateAttestationOccurrenceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ValidateAttestationOccurrenceResponse.newBuilder() to construct. + private ValidateAttestationOccurrenceResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ValidateAttestationOccurrenceResponse() { + result_ = 0; + denialReason_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ValidateAttestationOccurrenceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ValidateAttestationOccurrenceResponse( + 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(); + + result_ = rawValue; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + denialReason_ = 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.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.class, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Builder.class); + } + + /** + * + * + *
+     * The enum returned in the "result" field.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result} + */ + public enum Result implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + RESULT_UNSPECIFIED(0), + /** + * + * + *
+       * The Attestation was able to verified by the Attestor.
+       * 
+ * + * VERIFIED = 1; + */ + VERIFIED(1), + /** + * + * + *
+       * The Attestation was not able to verified by the Attestor.
+       * 
+ * + * ATTESTATION_NOT_VERIFIABLE = 2; + */ + ATTESTATION_NOT_VERIFIABLE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Unspecified.
+       * 
+ * + * RESULT_UNSPECIFIED = 0; + */ + public static final int RESULT_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * The Attestation was able to verified by the Attestor.
+       * 
+ * + * VERIFIED = 1; + */ + public static final int VERIFIED_VALUE = 1; + /** + * + * + *
+       * The Attestation was not able to verified by the Attestor.
+       * 
+ * + * ATTESTATION_NOT_VERIFIABLE = 2; + */ + public static final int ATTESTATION_NOT_VERIFIABLE_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 Result 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 Result forNumber(int value) { + switch (value) { + case 0: + return RESULT_UNSPECIFIED; + case 1: + return VERIFIED; + case 2: + return ATTESTATION_NOT_VERIFIABLE; + 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 Result findValueByNumber(int number) { + return Result.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.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Result[] VALUES = values(); + + public static Result 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 Result(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result) + } + + public static final int RESULT_FIELD_NUMBER = 1; + private int result_; + /** + * + * + *
+     * The result of the Attestation validation.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+     * The result of the Attestation validation.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The result. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + getResult() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + result = + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.valueOf(result_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.UNRECOGNIZED + : result; + } + + public static final int DENIAL_REASON_FIELD_NUMBER = 2; + private volatile java.lang.Object denialReason_; + /** + * + * + *
+     * The reason for denial if the Attestation couldn't be validated.
+     * 
+ * + * string denial_reason = 2; + * + * @return The denialReason. + */ + @java.lang.Override + public java.lang.String getDenialReason() { + java.lang.Object ref = denialReason_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + denialReason_ = s; + return s; + } + } + /** + * + * + *
+     * The reason for denial if the Attestation couldn't be validated.
+     * 
+ * + * string denial_reason = 2; + * + * @return The bytes for denialReason. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDenialReasonBytes() { + java.lang.Object ref = denialReason_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + denialReason_ = 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 (result_ + != com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.RESULT_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, result_); + } + if (!getDenialReasonBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, denialReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (result_ + != com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.RESULT_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); + } + if (!getDenialReasonBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, denialReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse)) { + return super.equals(obj); + } + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + other = + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse) + obj; + + if (result_ != other.result_) return false; + if (!getDenialReason().equals(other.getDenialReason())) return false; + if (!unknownFields.equals(other.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) + RESULT_FIELD_NUMBER; + hash = (53 * hash) + result_; + hash = (37 * hash) + DENIAL_REASON_FIELD_NUMBER; + hash = (53 * hash) + getDenialReason().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Response message for
+     * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
+     * 
+ * + * Protobuf type {@code + * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.class, + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Builder.class); + } + + // Construct using + // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + result_ = 0; + + denialReason_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + getDefaultInstanceForType() { + return com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + build() { + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + buildPartial() { + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + result = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse(this); + result.result_ = result_; + result.denialReason_ = denialReason_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse) { + return mergeFrom( + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + other) { + if (other + == com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.getDefaultInstance()) return this; + if (other.result_ != 0) { + setResultValue(other.getResultValue()); + } + if (!other.getDenialReason().isEmpty()) { + denialReason_ = other.denialReason_; + 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.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int result_ = 0; + /** + * + * + *
+       * The result of the Attestation validation.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The enum numeric value on the wire for result. + */ + @java.lang.Override + public int getResultValue() { + return result_; + } + /** + * + * + *
+       * The result of the Attestation validation.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @param value The enum numeric value on the wire for result to set. + * @return This builder for chaining. + */ + public Builder setResultValue(int value) { + + result_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The result of the Attestation validation.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return The result. + */ + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + getResult() { + @SuppressWarnings("deprecation") + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + result = + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.valueOf(result_); + return result == null + ? com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The result of the Attestation validation.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @param value The result to set. + * @return This builder for chaining. + */ + public Builder setResult( + com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse.Result + value) { + if (value == null) { + throw new NullPointerException(); + } + + result_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The result of the Attestation validation.
+       * 
+ * + * + * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; + * + * + * @return This builder for chaining. + */ + public Builder clearResult() { + + result_ = 0; + onChanged(); + return this; + } + + private java.lang.Object denialReason_ = ""; + /** + * + * + *
+       * The reason for denial if the Attestation couldn't be validated.
+       * 
+ * + * string denial_reason = 2; + * + * @return The denialReason. + */ + public java.lang.String getDenialReason() { + java.lang.Object ref = denialReason_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + denialReason_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The reason for denial if the Attestation couldn't be validated.
+       * 
+ * + * string denial_reason = 2; + * + * @return The bytes for denialReason. + */ + public com.google.protobuf.ByteString getDenialReasonBytes() { + java.lang.Object ref = denialReason_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + denialReason_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The reason for denial if the Attestation couldn't be validated.
+       * 
+ * + * string denial_reason = 2; + * + * @param value The denialReason to set. + * @return This builder for chaining. + */ + public Builder setDenialReason(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + denialReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The reason for denial if the Attestation couldn't be validated.
+       * 
+ * + * string denial_reason = 2; + * + * @return This builder for chaining. + */ + public Builder clearDenialReason() { + + denialReason_ = getDefaultInstance().getDenialReason(); + onChanged(); + return this; + } + /** + * + * + *
+       * The reason for denial if the Attestation couldn't be validated.
+       * 
+ * + * string denial_reason = 2; + * + * @param value The bytes for denialReason to set. + * @return This builder for chaining. + */ + public Builder setDenialReasonBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + denialReason_ = 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.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) + private static final com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse(); + } + + public static com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ValidateAttestationOccurrenceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ValidateAttestationOccurrenceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.protos.google.cloud.binaryauthorization.v1.Service + .ValidateAttestationOccurrenceResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_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/binaryauthorization/v1/se" + + "rvice.proto\022#google.cloud.binaryauthoriz" + + "ation.v1\032\034google/api/annotations.proto\032\027" + + "google/api/client.proto\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\0323google/cloud/binaryauthorization/v1" + + "/resources.proto\032\033google/protobuf/empty." + + "proto\032\034grafeas/v1/attestation.proto\"S\n\020G" + + "etPolicyRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)b" + + "inaryauthorization.googleapis.com/Policy" + + "\"W\n\023UpdatePolicyRequest\022@\n\006policy\030\001 \001(\0132" + + "+.google.cloud.binaryauthorization.v1.Po" + + "licyB\003\340A\002\"\274\001\n\025CreateAttestorRequest\022C\n\006p" + + "arent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" + + "r.googleapis.com/Project\022\030\n\013attestor_id\030" + + "\002 \001(\tB\003\340A\002\022D\n\010attestor\030\003 \001(\0132-.google.cl" + + "oud.binaryauthorization.v1.AttestorB\003\340A\002" + + "\"W\n\022GetAttestorRequest\022A\n\004name\030\001 \001(\tB3\340A" + + "\002\372A-\n+binaryauthorization.googleapis.com" + + "/Attestor\"]\n\025UpdateAttestorRequest\022D\n\010at" + + "testor\030\001 \001(\0132-.google.cloud.binaryauthor" + + "ization.v1.AttestorB\003\340A\002\"\202\001\n\024ListAttesto" + + "rsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloud" + + "resourcemanager.googleapis.com/Project\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"r\n" + + "\025ListAttestorsResponse\022@\n\tattestors\030\001 \003(" + + "\0132-.google.cloud.binaryauthorization.v1." + + "Attestor\022\027\n\017next_page_token\030\002 \001(\t\"Z\n\025Del" + + "eteAttestorRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-" + + "\n+binaryauthorization.googleapis.com/Att" + + "estor\"Y\n\026GetSystemPolicyRequest\022?\n\004name\030" + + "\001 \001(\tB1\340A\002\372A+\n)binaryauthorization.googl" + + "eapis.com/Policy\"\276\001\n$ValidateAttestation" + + "OccurrenceRequest\022\025\n\010attestor\030\001 \001(\tB\003\340A\002" + + "\022;\n\013attestation\030\002 \001(\0132!.grafeas.v1.Attes" + + "tationOccurrenceB\003\340A\002\022\034\n\017occurrence_note" + + "\030\003 \001(\tB\003\340A\002\022$\n\027occurrence_resource_uri\030\004" + + " \001(\tB\003\340A\002\"\361\001\n%ValidateAttestationOccurre" + + "nceResponse\022a\n\006result\030\001 \001(\0162Q.google.clo" + + "ud.binaryauthorization.v1.ValidateAttest" + + "ationOccurrenceResponse.Result\022\025\n\rdenial" + + "_reason\030\002 \001(\t\"N\n\006Result\022\026\n\022RESULT_UNSPEC" + + "IFIED\020\000\022\014\n\010VERIFIED\020\001\022\036\n\032ATTESTATION_NOT" + + "_VERIFIABLE\020\0022\342\n\n\033BinauthzManagementServ" + + "iceV1\022\234\001\n\tGetPolicy\0225.google.cloud.binar" + + "yauthorization.v1.GetPolicyRequest\032+.goo" + + "gle.cloud.binaryauthorization.v1.Policy\"" + + "+\202\323\344\223\002\036\022\034/v1/{name=projects/*/policy}\332A\004" + + "name\022\263\001\n\014UpdatePolicy\0228.google.cloud.bin" + + "aryauthorization.v1.UpdatePolicyRequest\032" + + "+.google.cloud.binaryauthorization.v1.Po" + + "licy\"<\202\323\344\223\002-\032#/v1/{policy.name=projects/" + + "*/policy}:\006policy\332A\006policy\022\316\001\n\016CreateAtt" + + "estor\022:.google.cloud.binaryauthorization" + + ".v1.CreateAttestorRequest\032-.google.cloud" + + ".binaryauthorization.v1.Attestor\"Q\202\323\344\223\002-" + + "\"!/v1/{parent=projects/*}/attestors:\010att" + + "estor\332A\033parent,attestor_id,attestor\022\247\001\n\013" + + "GetAttestor\0227.google.cloud.binaryauthori" + + "zation.v1.GetAttestorRequest\032-.google.cl" + + "oud.binaryauthorization.v1.Attestor\"0\202\323\344" + + "\223\002#\022!/v1/{name=projects/*/attestors/*}\332A" + + "\004name\022\304\001\n\016UpdateAttestor\022:.google.cloud." + + "binaryauthorization.v1.UpdateAttestorReq" + + "uest\032-.google.cloud.binaryauthorization." + + "v1.Attestor\"G\202\323\344\223\0026\032*/v1/{attestor.name=" + + "projects/*/attestors/*}:\010attestor\332A\010atte" + + "stor\022\272\001\n\rListAttestors\0229.google.cloud.bi" + + "naryauthorization.v1.ListAttestorsReques" + + "t\032:.google.cloud.binaryauthorization.v1." + + "ListAttestorsResponse\"2\202\323\344\223\002#\022!/v1/{pare" + + "nt=projects/*}/attestors\332A\006parent\022\226\001\n\016De" + + "leteAttestor\022:.google.cloud.binaryauthor" + + "ization.v1.DeleteAttestorRequest\032\026.googl" + + "e.protobuf.Empty\"0\202\323\344\223\002#*!/v1/{name=proj" + + "ects/*/attestors/*}\332A\004name\032V\312A\"binaryaut" + + "horization.googleapis.com\322A.https://www." + + "googleapis.com/auth/cloud-platform2\224\002\n\016S" + + "ystemPolicyV1\022\251\001\n\017GetSystemPolicy\022;.goog" + + "le.cloud.binaryauthorization.v1.GetSyste" + + "mPolicyRequest\032+.google.cloud.binaryauth" + + "orization.v1.Policy\",\202\323\344\223\002\037\022\035/v1/{name=l" + + "ocations/*/policy}\332A\004name\032V\312A\"binaryauth" + + "orization.googleapis.com\322A.https://www.g" + + "oogleapis.com/auth/cloud-platform2\365\002\n\022Va" + + "lidationHelperV1\022\206\002\n\035ValidateAttestation" + + "Occurrence\022I.google.cloud.binaryauthoriz" + + "ation.v1.ValidateAttestationOccurrenceRe" + + "quest\032J.google.cloud.binaryauthorization" + + ".v1.ValidateAttestationOccurrenceRespons" + + "e\"N\202\323\344\223\002H\"C/v1/{attestor=projects/*/atte" + + "stors/*}:validateAttestationOccurrence:\001" + + "*\032V\312A\"binaryauthorization.googleapis.com" + + "\322A.https://www.googleapis.com/auth/cloud" + + "-platformB\211\002\n5com.google.protos.google.c" + + "loud.binaryauthorization.v1P\000ZVgoogle.go" + + "lang.org/genproto/googleapis/cloud/binar" + + "yauthorization/v1;binaryauthorization\370\001\001" + + "\252\002#Google.Cloud.BinaryAuthorization.V1\312\002" + + "#Google\\Cloud\\BinaryAuthorization\\V1\352\002&G" + + "oogle::Cloud::BinaryAuthorization::V1b\006p" + + "roto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.protos.google.cloud.binaryauthorization.v1.Resources.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + io.grafeas.v1.Attestation.getDescriptor(), + }); + internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor, + new java.lang.String[] { + "Policy", + }); + internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor, + new java.lang.String[] { + "Parent", "AttestorId", "Attestor", + }); + internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor, + new java.lang.String[] { + "Attestor", + }); + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor, + new java.lang.String[] { + "Attestors", "NextPageToken", + }); + internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor, + new java.lang.String[] { + "Attestor", "Attestation", "OccurrenceNote", "OccurrenceResourceUri", + }); + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor, + new java.lang.String[] { + "Result", "DenialReason", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.protos.google.cloud.binaryauthorization.v1.Resources.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + io.grafeas.v1.Attestation.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto new file mode 100644 index 00000000..9d72a9f0 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto @@ -0,0 +1,334 @@ +// 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.binaryauthorization.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1;binaryauthorization"; +option java_multiple_files = false; +option java_package = "com.google.protos.google.cloud.binaryauthorization.v1"; +option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1"; +option ruby_package = "Google::Cloud::BinaryAuthorization::V1"; + +// A [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization. +message Policy { + option (google.api.resource) = { + type: "binaryauthorization.googleapis.com/Policy" + pattern: "projects/{project}/policy" + pattern: "locations/{location}/policy" + }; + + enum GlobalPolicyEvaluationMode { + // Not specified: DISABLE is assumed. + GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; + + // Enables system policy evaluation. + ENABLE = 1; + + // Disables system policy evaluation. + DISABLE = 2; + } + + // Output only. The resource name, in the format `projects/*/policy`. There is + // at most one policy per project. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A descriptive comment. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls the evaluation of a Google-maintained global admission + // policy for common system-level images. Images not covered by the global + // policy will be subject to the project admission policy. This setting + // has no effect when specified inside a global admission policy. + GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Admission policy allowlisting. A matching admission request will + // always be permitted. This feature is typically used to exclude Google or + // third-party infrastructure images from Binary Authorization policies. + repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-cluster admission rules. Cluster spec format: + // `location.clusterId`. There can be at most one admission rule per cluster + // spec. + // A `location` is either a compute zone (e.g. us-central1-a) or a region + // (e.g. us-central1). + // For `clusterId` syntax restrictions see + // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. + map cluster_admission_rules = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + // [a-z.-]+, e.g. 'some-namespace' + map kubernetes_namespace_admission_rules = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-kubernetes-service-account admission rules. Service account + // spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' + map kubernetes_service_account_admission_rules = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-istio-service-identity admission rules. Istio service + // identity spec format: + // spiffe:///ns//sa/ or + // /ns//sa/ + // e.g. spiffe://example.com/ns/test-ns/sa/default + map istio_service_identity_admission_rules = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Default admission rule for a cluster without a per-cluster, per- + // kubernetes-service-account, or per-istio-service-identity admission rule. + AdmissionRule default_admission_rule = 4 [(google.api.field_behavior) = REQUIRED]; + + // Output only. Time when the policy was last updated. + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images +// from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule]. +message AdmissionWhitelistPattern { + // An image name pattern to allowlist, in the form `registry/path/to/image`. + // This supports a trailing `*` wildcard, but this is allowed only in + // text after the `registry/` part. This also supports a trailing `**` + // wildcard which matches subdirectories of a given entry. + string name_pattern = 1; +} + +// An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images +// used in a pod creation request must be attested to by one or more +// [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all +// pod creations will be denied. +// +// Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] +// are exempted from admission rules and will never block a pod creation. +message AdmissionRule { + enum EvaluationMode { + // Do not use. + EVALUATION_MODE_UNSPECIFIED = 0; + + // This rule allows all all pod creations. + ALWAYS_ALLOW = 1; + + // This rule allows a pod creation if all the attestors listed in + // 'require_attestations_by' have valid attestations for all of the + // images in the pod spec. + REQUIRE_ATTESTATION = 2; + + // This rule denies all pod creations. + ALWAYS_DENY = 3; + } + + // Defines the possible actions when a pod creation is denied by an admission + // rule. + enum EnforcementMode { + // Do not use. + ENFORCEMENT_MODE_UNSPECIFIED = 0; + + // Enforce the admission rule by blocking the pod creation. + ENFORCED_BLOCK_AND_AUDIT_LOG = 1; + + // Dryrun mode: Audit logging only. This will allow the pod creation as if + // the admission request had specified break-glass. + DRYRUN_AUDIT_LOG_ONLY = 2; + } + + // Required. How this admission rule will be evaluated. + EvaluationMode evaluation_mode = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The resource names of the attestors that must attest to + // a container image, in the format `projects/*/attestors/*`. Each + // attestor must exist before a policy can reference it. To add an attestor + // to a policy the principal issuing the policy change request must be able + // to read the attestor resource. + // + // Note: this field must be non-empty when the evaluation_mode field specifies + // REQUIRE_ATTESTATION, otherwise it must be empty. + repeated string require_attestations_by = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The action when a pod creation is denied by the admission rule. + EnforcementMode enforcement_mode = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// An [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image +// artifacts. An existing attestor cannot be modified except where +// indicated. +message Attestor { + option (google.api.resource) = { + type: "binaryauthorization.googleapis.com/Attestor" + pattern: "projects/{project}/attestors/{attestor}" + }; + + // Required. The resource name, in the format: + // `projects/*/attestors/*`. This field may not be updated. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A descriptive comment. This field may be updated. + // The field may be displayed in chooser dialogs. + string description = 6 [(google.api.field_behavior) = OPTIONAL]; + + oneof attestor_type { + // This specifies how an attestation will be read, and how it will be used + // during policy enforcement. + UserOwnedGrafeasNote user_owned_grafeas_note = 3; + } + + // Output only. Time when the attestor was last updated. + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// An [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas +// Attestation.Authority Note created by the user. +message UserOwnedGrafeasNote { + // Required. The Grafeas resource name of a Attestation.Authority Note, + // created by the user, in the format: `projects/*/notes/*`. This field may + // not be updated. + // + // An attestation by this attestor is stored as a Grafeas + // Attestation.Authority Occurrence that names a container image and that + // links to this Note. Grafeas is an external dependency. + string note_reference = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Public keys that verify attestations signed by this + // attestor. This field may be updated. + // + // If this field is non-empty, one of the specified public keys must + // verify that an attestation was signed by this attestor for the + // image specified in the admission request. + // + // If this field is empty, this attestor always returns that no + // valid attestations exist. + repeated AttestorPublicKey public_keys = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. This field will contain the service account email address + // that this Attestor will use as the principal when querying Container + // Analysis. Attestor administrators must grant this service account the + // IAM role needed to read attestations from the [note_reference][Note] in + // Container Analysis (`containeranalysis.notes.occurrences.viewer`). + // + // This email address is fixed for the lifetime of the Attestor, but callers + // should not make any other assumptions about the service account email; + // future versions may use an email based on a different naming pattern. + string delegation_service_account_email = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A public key in the PkixPublicKey format (see +// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). +// Public keys of this type are typically textually encoded using the PEM +// format. +message PkixPublicKey { + // Represents a signature algorithm and other information necessary to verify + // signatures with a given public key. + // This is based primarily on the public key types supported by Tink's + // PemKeyType, which is in turn based on KMS's supported signing algorithms. + // See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz + // might support additional public key types independently of Tink and/or KMS. + enum SignatureAlgorithm { + option allow_alias = true; + + // Not specified. + SIGNATURE_ALGORITHM_UNSPECIFIED = 0; + + // RSASSA-PSS 2048 bit key with a SHA256 digest. + RSA_PSS_2048_SHA256 = 1; + + // RSASSA-PSS 3072 bit key with a SHA256 digest. + RSA_PSS_3072_SHA256 = 2; + + // RSASSA-PSS 4096 bit key with a SHA256 digest. + RSA_PSS_4096_SHA256 = 3; + + // RSASSA-PSS 4096 bit key with a SHA512 digest. + RSA_PSS_4096_SHA512 = 4; + + // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_2048_SHA256 = 5; + + // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_3072_SHA256 = 6; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. + RSA_SIGN_PKCS1_4096_SHA256 = 7; + + // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. + RSA_SIGN_PKCS1_4096_SHA512 = 8; + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + ECDSA_P256_SHA256 = 9; + + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 9; + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + ECDSA_P384_SHA384 = 10; + + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 10; + + // ECDSA on the NIST P-521 curve with a SHA512 digest. + ECDSA_P521_SHA512 = 11; + + // ECDSA on the NIST P-521 curve with a SHA512 digest. + EC_SIGN_P521_SHA512 = 11; + } + + // A PEM-encoded public key, as described in + // https://tools.ietf.org/html/rfc7468#section-13 + string public_key_pem = 1; + + // The signature algorithm used to verify a message against a signature using + // this key. + // These signature algorithm must match the structure and any object + // identifiers encoded in `public_key_pem` (i.e. this algorithm must match + // that of the public key). + SignatureAlgorithm signature_algorithm = 2; +} + +// An [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify +// attestations signed by this attestor. +message AttestorPublicKey { + // Optional. A descriptive comment. This field may be updated. + string comment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // The ID of this public key. + // Signatures verified by BinAuthz must include the ID of the public key that + // can be used to verify them, and that ID must match the contents of this + // field exactly. + // Additional restrictions on this field can be imposed based on which public + // key type is encapsulated. See the documentation on `public_key` cases below + // for details. + string id = 2; + + oneof public_key { + // ASCII-armored representation of a PGP public key, as the entire output by + // the command `gpg --export --armor foo@example.com` (either LF or CRLF + // line endings). + // When using this field, `id` should be left blank. The BinAuthz API + // handlers will calculate the ID and fill it in automatically. BinAuthz + // computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as + // upper-case hex. If `id` is provided by the caller, it will be + // overwritten by the API-calculated ID. + string ascii_armored_pgp_public_key = 3; + + // A raw PKIX SubjectPublicKeyInfo format public key. + // + // NOTE: `id` may be explicitly provided by the caller when using this + // type of public key, but it MUST be a valid RFC3986 URI. If `id` is left + // blank, a default one will be computed based on the digest of the DER + // encoding of the public key. + PkixPublicKey pkix_public_key = 5; + } +} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto new file mode 100644 index 00000000..e063aacc --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto @@ -0,0 +1,312 @@ +// 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.binaryauthorization.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/binaryauthorization/v1/resources.proto"; +import "google/protobuf/empty.proto"; +import "grafeas/v1/attestation.proto"; + +option cc_enable_arenas = true; +option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1"; +option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1;binaryauthorization"; +option java_multiple_files = false; +option java_package = "com.google.protos.google.cloud.binaryauthorization.v1"; +option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1"; +option ruby_package = "Google::Cloud::BinaryAuthorization::V1"; + +// Customer-facing API for Cloud Binary Authorization. + +// Google Cloud Management Service for Binary Authorization admission policies +// and attestation authorities. +// +// This API implements a REST model with the following objects: +// +// * [Policy][google.cloud.binaryauthorization.v1.Policy] +// * [Attestor][google.cloud.binaryauthorization.v1.Attestor] +service BinauthzManagementServiceV1 { + option (google.api.default_host) = "binaryauthorization.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to + // a container image, before the project is allowed to deploy that + // image. There is at most one policy per project. All image admission + // requests are permitted if a project has no policy. + // + // Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default + // [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. + rpc GetPolicy(GetPolicyRequest) returns (Policy) { + option (google.api.http) = { + get: "/v1/{name=projects/*/policy}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the + // new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race + // conditions with concurrent policy enforcement (or management!) + // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + // if the request is malformed. + rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) { + option (google.api.http) = { + put: "/v1/{policy.name=projects/*/policy}" + body: "policy" + }; + option (google.api.method_signature) = "policy"; + } + + // Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new + // [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, + // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + // [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. + rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) { + option (google.api.http) = { + post: "/v1/{parent=projects/*}/attestors" + body: "attestor" + }; + option (google.api.method_signature) = "parent,attestor_id,attestor"; + } + + // Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc GetAttestor(GetAttestorRequest) returns (Attestor) { + option (google.api.http) = { + get: "/v1/{name=projects/*/attestors/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) { + option (google.api.http) = { + put: "/v1/{attestor.name=projects/*/attestors/*}" + body: "attestor" + }; + option (google.api.method_signature) = "attestor"; + } + + // Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. + // Returns INVALID_ARGUMENT if the project does not exist. + rpc ListAttestors(ListAttestorsRequest) returns (ListAttestorsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*}/attestors" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the + // [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. + rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/attestors/*}" + }; + option (google.api.method_signature) = "name"; + } +} + +// API for working with the system policy. +service SystemPolicyV1 { + option (google.api.default_host) = "binaryauthorization.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Gets the current system policy in the specified location. + rpc GetSystemPolicy(GetSystemPolicyRequest) returns (Policy) { + option (google.api.http) = { + get: "/v1/{name=locations/*/policy}" + }; + option (google.api.method_signature) = "name"; + } +} + +// BinAuthz Attestor verification +service ValidationHelperV1 { + option (google.api.default_host) = "binaryauthorization.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Returns whether the given Attestation for the given image URI + // was signed by the given Attestor + rpc ValidateAttestationOccurrence(ValidateAttestationOccurrenceRequest) returns (ValidateAttestationOccurrenceResponse) { + option (google.api.http) = { + post: "/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence" + body: "*" + }; + } +} + +// Request message for [BinauthzManagementService.GetPolicy][]. +message GetPolicyRequest { + // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, + // in the format `projects/*/policy`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Policy" + } + ]; +} + +// Request message for [BinauthzManagementService.UpdatePolicy][]. +message UpdatePolicyRequest { + // Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will + // overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in + // the request URL, in the format `projects/*/policy`. + Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [BinauthzManagementService.CreateAttestor][]. +message CreateAttestorRequest { + // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. + string attestor_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, + // in the format `projects/*/attestors/*`. + Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [BinauthzManagementService.GetAttestor][]. +message GetAttestorRequest { + // Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format + // `projects/*/attestors/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Attestor" + } + ]; +} + +// Request message for [BinauthzManagementService.UpdateAttestor][]. +message UpdateAttestorRequest { + // Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name + // in the request URL, in the format `projects/*/attestors/*`. + Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [BinauthzManagementService.ListAttestors][]. +message ListAttestorsRequest { + // Required. The resource name of the project associated with the + // [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudresourcemanager.googleapis.com/Project" + } + ]; + + // Requested page size. The server may return fewer results than requested. If + // unspecified, the server will pick an appropriate default. + int32 page_size = 2; + + // A token identifying a page of results the server should return. Typically, + // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned + // from the previous call to the `ListAttestors` method. + string page_token = 3; +} + +// Response message for [BinauthzManagementService.ListAttestors][]. +message ListAttestorsResponse { + // The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. + repeated Attestor attestors = 1; + + // A token to retrieve the next page of results. Pass this value in the + // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the + // `ListAttestors` method to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for [BinauthzManagementService.DeleteAttestor][]. +message DeleteAttestorRequest { + // Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format + // `projects/*/attestors/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Attestor" + } + ]; +} + +// Request to read the current system policy. +message GetSystemPolicyRequest { + // Required. The resource name, in the format `locations/*/policy`. + // Note that the system policy is not associated with a project. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Policy" + } + ]; +} + +// Request message for +// [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence]. +message ValidateAttestationOccurrenceRequest { + // Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the + // [occurrence][grafeas.v1.Occurrence], in the format + // `projects/*/attestors/*`. + string attestor = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to + // be checked that it can be verified by the Attestor. It does not have to be + // an existing entity in Container Analysis. It must otherwise be a valid + // AttestationOccurrence. + grafeas.v1.AttestationOccurrence attestation = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The resource name of the [Note][grafeas.v1.Note] to which the + // containing [Occurrence][grafeas.v1.Occurrence] is associated. + string occurrence_note = 3 [(google.api.field_behavior) = REQUIRED]; + + // Required. The URI of the artifact (e.g. container image) that is the + // subject of the containing [Occurrence][grafeas.v1.Occurrence]. + string occurrence_resource_uri = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence]. +message ValidateAttestationOccurrenceResponse { + // The enum returned in the "result" field. + enum Result { + // Unspecified. + RESULT_UNSPECIFIED = 0; + + // The Attestation was able to verified by the Attestor. + VERIFIED = 1; + + // The Attestation was not able to verified by the Attestor. + ATTESTATION_NOT_VERIFIABLE = 2; + } + + // The result of the Attestation validation. + Result result = 1; + + // The reason for denial if the Attestation couldn't be validated. + string denial_reason = 2; +} diff --git a/versions.txt b/versions.txt index 487ce4eb..6608cb0e 100644 --- a/versions.txt +++ b/versions.txt @@ -3,4 +3,6 @@ google-cloud-binary-authorization:0.3.3:0.3.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:0.3.3:0.3.4-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1:0.3.3:0.3.4-SNAPSHOT From 63e8e93d88e156992fcdff14e797b828c92e5eda Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 21 Oct 2021 21:58:28 +0000 Subject: [PATCH 008/203] chore(ruby): Re-enable bigquery-storage-v1 generation, which also required updating protobuf from 3.15.3 to 3.18.1 for codegen (#99) - [x] Regenerate this pull request now. PiperOrigin-RevId: 403132955 Source-Link: https://github.com/googleapis/googleapis/commit/d2977af9e9f1fc0c9dc8368352daa032471f3c63 Source-Link: https://github.com/googleapis/googleapis-gen/commit/99bb13c813c0e9c2682d03a8b3c3bcb382a909c9 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTliYjEzYzgxM2MwZTljMjY4MmQwM2E4YjNjM2JjYjM4MmE5MDljOSJ9 --- .../binaryauthorization/v1/Resources.java | 40 +++++++------- .../cloud/binaryauthorization/v1/Service.java | 52 +++++++++---------- .../v1beta1/AdmissionWhitelistPattern.java | 4 +- .../binaryauthorization/v1beta1/Attestor.java | 8 +-- .../v1beta1/AttestorPublicKey.java | 8 +-- .../v1beta1/ContinuousValidationEvent.java | 16 +++--- .../v1beta1/CreateAttestorRequest.java | 8 +-- .../v1beta1/DeleteAttestorRequest.java | 4 +- .../v1beta1/GetAttestorRequest.java | 4 +- .../v1beta1/GetPolicyRequest.java | 4 +- .../v1beta1/ListAttestorsRequest.java | 8 +-- .../v1beta1/ListAttestorsResponse.java | 4 +- .../v1beta1/PkixPublicKey.java | 4 +- .../binaryauthorization/v1beta1/Policy.java | 8 +-- .../v1beta1/UserOwnedDrydockNote.java | 8 +-- 15 files changed, 90 insertions(+), 90 deletions(-) diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java index 57880167..f8a7c070 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java @@ -2060,7 +2060,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { @@ -2077,7 +2077,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(5, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } if (globalPolicyEvaluationMode_ @@ -2110,7 +2110,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { @@ -2141,7 +2141,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } if (globalPolicyEvaluationMode_ @@ -5129,7 +5129,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNamePatternBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); } unknownFields.writeTo(output); @@ -5141,7 +5141,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNamePatternBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); } size += unknownFields.getSerializedSize(); @@ -7970,7 +7970,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (attestorTypeCase_ == 3) { @@ -7982,7 +7982,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(4, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } unknownFields.writeTo(output); @@ -7994,7 +7994,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (attestorTypeCase_ == 3) { @@ -8008,7 +8008,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } size += unknownFields.getSerializedSize(); @@ -9726,13 +9726,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNoteReferenceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, noteReference_); } for (int i = 0; i < publicKeys_.size(); i++) { output.writeMessage(2, publicKeys_.get(i)); } - if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { com.google.protobuf.GeneratedMessageV3.writeString( output, 3, delegationServiceAccountEmail_); } @@ -9745,13 +9745,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNoteReferenceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, noteReference_); } for (int i = 0; i < publicKeys_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, publicKeys_.get(i)); } - if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize( 3, delegationServiceAccountEmail_); @@ -11780,7 +11780,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getPublicKeyPemBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKeyPem_); } if (signatureAlgorithm_ @@ -11798,7 +11798,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getPublicKeyPemBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKeyPem_); } if (signatureAlgorithm_ @@ -13082,10 +13082,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getCommentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, comment_); } - if (!getIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); } if (publicKeyCase_ == 3) { @@ -13106,10 +13106,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getCommentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, comment_); } - if (!getIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); } if (publicKeyCase_ == 3) { diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java index ee36ba6e..8856c97e 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java @@ -226,7 +226,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -238,7 +238,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); @@ -2013,10 +2013,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getAttestorIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attestorId_); } if (attestor_ != null) { @@ -2031,10 +2031,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getAttestorIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attestorId_); } if (attestor_ != null) { @@ -3117,7 +3117,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -3129,7 +3129,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); @@ -4842,13 +4842,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } unknownFields.writeTo(output); @@ -4860,13 +4860,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } size += unknownFields.getSerializedSize(); @@ -5911,7 +5911,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < attestors_.size(); i++) { output.writeMessage(1, attestors_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -5926,7 +5926,7 @@ public int getSerializedSize() { for (int i = 0; i < attestors_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attestors_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); @@ -7072,7 +7072,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -7084,7 +7084,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); @@ -7800,7 +7800,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -7812,7 +7812,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); @@ -8831,16 +8831,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getAttestorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestor_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attestor_); } if (attestation_ != null) { output.writeMessage(2, getAttestation()); } - if (!getOccurrenceNoteBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceNote_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, occurrenceNote_); } - if (!getOccurrenceResourceUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, occurrenceResourceUri_); } unknownFields.writeTo(output); @@ -8852,16 +8852,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getAttestorBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestor_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attestor_); } if (attestation_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAttestation()); } - if (!getOccurrenceNoteBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceNote_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, occurrenceNote_); } - if (!getOccurrenceResourceUriBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, occurrenceResourceUri_); } size += unknownFields.getSerializedSize(); @@ -10332,7 +10332,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, result_); } - if (!getDenialReasonBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, denialReason_); } unknownFields.writeTo(output); @@ -10350,7 +10350,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); } - if (!getDenialReasonBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, denialReason_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java index da06701e..e0831600 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java @@ -181,7 +181,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNamePatternBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); } unknownFields.writeTo(output); @@ -193,7 +193,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNamePatternBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java index 4b84e894..e51745db 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java @@ -427,7 +427,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (attestorTypeCase_ == 3) { @@ -437,7 +437,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(4, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } unknownFields.writeTo(output); @@ -449,7 +449,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (attestorTypeCase_ == 3) { @@ -460,7 +460,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java index ef225b30..43f719bb 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java @@ -474,10 +474,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getCommentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, comment_); } - if (!getIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); } if (publicKeyCase_ == 3) { @@ -496,10 +496,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getCommentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, comment_); } - if (!getIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); } if (publicKeyCase_ == 3) { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java index ffa30923..72679d3f 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java @@ -1181,7 +1181,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getImageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, image_); } if (result_ @@ -1190,7 +1190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, result_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } unknownFields.writeTo(output); @@ -1202,7 +1202,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getImageBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, image_); } if (result_ @@ -1211,7 +1211,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, result_); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } size += unknownFields.getSerializedSize(); @@ -2266,7 +2266,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getPodBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pod_); } if (deployTime_ != null) { @@ -2294,7 +2294,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getPodBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pod_); } if (deployTime_ != null) { @@ -4047,7 +4047,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); } unknownFields.writeTo(output); @@ -4059,7 +4059,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java index d749d7d4..0180b7fe 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java @@ -322,10 +322,10 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } - if (!getAttestorIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attestorId_); } if (attestor_ != null) { @@ -340,10 +340,10 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } - if (!getAttestorIdBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attestorId_); } if (attestor_ != null) { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java index d61f0bae..c0cf7b2f 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java @@ -182,7 +182,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -194,7 +194,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java index b6ae0207..0d9475df 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java @@ -182,7 +182,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -194,7 +194,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java index 1fea3b86..ca6e6f00 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java @@ -182,7 +182,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } unknownFields.writeTo(output); @@ -194,7 +194,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java index 5b96626a..530d734c 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java @@ -269,13 +269,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); } if (pageSize_ != 0) { output.writeInt32(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } unknownFields.writeTo(output); @@ -287,13 +287,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getParentBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); } if (pageSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); } - if (!getPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java index c9167ec2..d6e56bd3 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java @@ -272,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < attestors_.size(); i++) { output.writeMessage(1, attestors_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } unknownFields.writeTo(output); @@ -287,7 +287,7 @@ public int getSerializedSize() { for (int i = 0; i < attestors_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attestors_.get(i)); } - if (!getNextPageTokenBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } size += unknownFields.getSerializedSize(); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java index 9176f28f..db4071b2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java @@ -604,7 +604,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getPublicKeyPemBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKeyPem_); } if (signatureAlgorithm_ @@ -622,7 +622,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getPublicKeyPemBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKeyPem_); } if (signatureAlgorithm_ diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java index c8e61918..e040371d 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java @@ -883,7 +883,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { @@ -900,7 +900,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(5, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } if (globalPolicyEvaluationMode_ @@ -918,7 +918,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { @@ -946,7 +946,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); } - if (!getDescriptionBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } if (globalPolicyEvaluationMode_ diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java index e20a9861..11e60f46 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java @@ -391,13 +391,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNoteReferenceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, noteReference_); } for (int i = 0; i < publicKeys_.size(); i++) { output.writeMessage(2, publicKeys_.get(i)); } - if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, delegationServiceAccountEmail_); } unknownFields.writeTo(output); @@ -409,13 +409,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNoteReferenceBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, noteReference_); } for (int i = 0; i < publicKeys_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, publicKeys_.get(i)); } - if (!getDelegationServiceAccountEmailBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize( 3, delegationServiceAccountEmail_); From 47a899b73033fd800d7671bd6d9d7e5575831ab8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 25 Oct 2021 21:04:23 +0000 Subject: [PATCH 009/203] fix(java): java 17 dependency arguments (#1266) (#107) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/dependencies.sh | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dc53bbb5..0df65ebe 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b2141d65566523dfd523f63c6e6899ab1281463bce182a9f600e74b0511875 + digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7..d7476cfe 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts) From 9648851b0bd24d9d6dc6ff11e80f85f3a6c232af Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 25 Oct 2021 23:06:34 +0200 Subject: [PATCH 010/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.0 (#106) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.1.0` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/compatibility-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.0/confidence-slim/1.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.0`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​120-httpswwwgithubcomgoogleapisjava-shared-configcomparev110v120-2021-10-21) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.1.0...v1.2.0) ##### Features - Introduce Native Image testing build script changes ([#​1240](https://www.togithub.com/googleapis/java-shared-config/issues/1240)) ([#​334](https://www.togithub.com/googleapis/java-shared-config/issues/334)) ([4643cf1](https://www.github.com/googleapis/java-shared-config/commit/4643cf15be0b37fa8fa905d544d438cda7ef2ecd)) ##### Bug Fixes - **java:** downgrade native maven plugin version ([#​335](https://www.togithub.com/googleapis/java-shared-config/issues/335)) ([5834284](https://www.github.com/googleapis/java-shared-config/commit/5834284176fb34713d10082ce04f3b6abba85ad8))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index b196ce0e..5c14f0e1 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 92ad4cde..55985a60 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.1.0 + 1.2.0 From 4b1e0d2cc14465c6c079ca38c1dd30360c2173d9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 26 Oct 2021 19:50:26 +0200 Subject: [PATCH 011/203] chore(deps): update dependency com.google.cloud:google-cloud-binary-authorization to v0.3.3 (#104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-binary-authorization](https://togithub.com/googleapis/java-binary-authorization) | `0.3.1` -> `0.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.3.3/compatibility-slim/0.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.3.3/confidence-slim/0.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-binary-authorization ### [`v0.3.3`](https://togithub.com/googleapis/java-binary-authorization/blob/master/CHANGELOG.md#​033-httpswwwgithubcomgoogleapisjava-binary-authorizationcomparev032v033-2021-10-19) [Compare Source](https://togithub.com/googleapis/java-binary-authorization/compare/v0.3.2...v0.3.3) ### [`v0.3.2`](https://togithub.com/googleapis/java-binary-authorization/blob/master/CHANGELOG.md#​032-httpswwwgithubcomgoogleapisjava-binary-authorizationcomparev031v032-2021-09-22) [Compare Source](https://togithub.com/googleapis/java-binary-authorization/compare/v0.3.1...v0.3.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 036d2285..b3440577 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.1 + 0.3.3 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f0cd8fb9..47016f17 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.1 + 0.3.3 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 83015f6e..07bd868c 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.1 + 0.3.3 From 1853da6f67619f4f74db0948e82685f2147d18ae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 02:52:27 +0100 Subject: [PATCH 012/203] deps: update dependency io.grafeas:grafeas to v2.1.0 (#108) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.0.6` -> `2.1.0` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.0/compatibility-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.0/confidence-slim/2.0.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.1.0`](https://togithub.com/googleapis/java-grafeas/blob/master/CHANGELOG.md#​210-httpswwwgithubcomgoogleapisjava-grafeascomparev206v210-2021-10-29) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.0.6...v2.1.0) ##### Features - Introduce Native Image testing build script changes ([#​402](https://www.togithub.com/googleapis/java-grafeas/issues/402)) ([b44ed2e](https://www.github.com/googleapis/java-grafeas/commit/b44ed2e4ea17d92d49d08984fd07f1d1e8d07de8)) ##### Bug Fixes - **java:** java 17 dependency arguments ([#​406](https://www.togithub.com/googleapis/java-grafeas/issues/406)) ([2d8fb41](https://www.github.com/googleapis/java-grafeas/commit/2d8fb418737ae84648024884205a80173df596bd)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#​404](https://www.togithub.com/googleapis/java-grafeas/issues/404)) ([1233d5c](https://www.github.com/googleapis/java-grafeas/commit/1233d5c4a4299d6fdafd1dc5bfe925f06c43e4f2)) ##### [2.0.6](https://www.github.com/googleapis/java-grafeas/compare/v2.0.5...v2.0.6) (2021-10-05) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9.0.1 ([#​397](https://www.togithub.com/googleapis/java-grafeas/issues/397)) ([9c9551f](https://www.github.com/googleapis/java-grafeas/commit/9c9551f873ede1d9252f78ecf366282b310e06ac)) ##### [2.0.5](https://www.github.com/googleapis/java-grafeas/compare/v2.0.4...v2.0.5) (2021-09-22) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#​389](https://www.togithub.com/googleapis/java-grafeas/issues/389)) ([98e8146](https://www.github.com/googleapis/java-grafeas/commit/98e8146610e47f2ce0c59df6adda383eac8b9e05)) ##### [2.0.4](https://www.github.com/googleapis/java-grafeas/compare/v2.0.3...v2.0.4) (2021-09-14) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#​384](https://www.togithub.com/googleapis/java-grafeas/issues/384)) ([6f58677](https://www.github.com/googleapis/java-grafeas/commit/6f58677a64a654482e3bf6d0d0baaea822a72cf8)) ##### [2.0.3](https://www.github.com/googleapis/java-grafeas/compare/v2.0.2...v2.0.3) (2021-09-10) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9 ([#​369](https://www.togithub.com/googleapis/java-grafeas/issues/369)) ([cb8330b](https://www.github.com/googleapis/java-grafeas/commit/cb8330bc9f0e37cd0ccd25474960caf01e60f2d9)) ##### [2.0.2](https://www.github.com/googleapis/java-grafeas/compare/v2.0.1...v2.0.2) (2021-09-10) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#​370](https://www.togithub.com/googleapis/java-grafeas/issues/370)) ([9b305cd](https://www.github.com/googleapis/java-grafeas/commit/9b305cdf9538af65eaded05cfff1d564610d25d4)) ##### [2.0.1](https://www.github.com/googleapis/java-grafeas/compare/v2.0.0...v2.0.1) (2021-08-23) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#​361](https://www.togithub.com/googleapis/java-grafeas/issues/361)) ([72c4260](https://www.github.com/googleapis/java-grafeas/commit/72c42609b79a3964130e53a29322b88acfb01036))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 55985a60..bf3bf20c 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.0.6 + 2.1.0 From 1ebd94b6cbf7518f806db8fd8c846507173a4c8b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 3 Nov 2021 22:42:18 +0100 Subject: [PATCH 013/203] deps: update dependency io.grafeas:grafeas to v2.1.1 (#109) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.1.0` -> `2.1.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.1/compatibility-slim/2.1.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.1/confidence-slim/2.1.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.1.1`](https://togithub.com/googleapis/java-grafeas/blob/master/CHANGELOG.md#​211-httpswwwgithubcomgoogleapisjava-grafeascomparev210v211-2021-11-03) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.1.0...v2.1.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bf3bf20c..7fdd19a5 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.1.0 + 2.1.1 From 5927592af567f33c07ce19cbec8a574a88f98596 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 4 Nov 2021 22:18:31 +0000 Subject: [PATCH 014/203] chore(java): remove pin on Apache Maven 3.8.1 from github actions (#1268) (#110) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0df65ebe..5a79fcd5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a3ac08d167454718ff057b97a1950d3cb5e16fc39fb3f355d90276285a6cac75 + digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2425d723..d95a11a2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,9 +12,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -27,9 +24,6 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -45,9 +39,6 @@ jobs: java: [8, 11, 17] steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -58,9 +49,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -73,9 +61,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - uses: stCarolas/setup-maven@v4 - with: - maven-version: 3.8.1 - uses: actions/setup-java@v2 with: distribution: zulu @@ -83,4 +68,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr + JOB_TYPE: clirr \ No newline at end of file From 558b0fb30c01f6213664f265e027d8c04a7f9aa5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 15:22:31 +0000 Subject: [PATCH 015/203] Update ci.yaml (#1275) (#111) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5a79fcd5..994dd04b 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:ed012741acaae5d03e011244585a1f0625a596d31568967d77772aa5a0a51d5e + digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d95a11a2..93b337c6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,7 @@ jobs: units: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: java: [8, 11, 17] steps: @@ -68,4 +69,4 @@ jobs: - run: java -version - run: .kokoro/build.sh env: - JOB_TYPE: clirr \ No newline at end of file + JOB_TYPE: clirr From b25e3025ae9f76d37a05707e487d48e7f54cdc9c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 8 Nov 2021 23:20:15 +0000 Subject: [PATCH 016/203] chore: cleanup cloud RAD generation (#1269) (#113) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc11.sh | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 994dd04b..325daaa4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:fecf6bd85f19eb046d913982ea36f6d434f9a49ab0545d25e31186aa64367c0c + digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index b08ffaab..23c7117b 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -36,13 +36,9 @@ mvn clean install -B -q -DskipTests=true export NAME=google-cloud-binary-authorization export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) -# V3 generates docfx yml from javadoc -# generate yml -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 +# cloud RAD generation +mvn clean javadoc:aggregate -B -q -P docFX +# include CHANGELOG cp CHANGELOG.md target/docfx-yml/history.md pushd target/docfx-yml From 06cfdfe3559fe746d73e1d80b928f1907c354bdc Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 9 Nov 2021 15:30:26 +0000 Subject: [PATCH 017/203] chore: update jre to 11 for linter (#1278) (#115) --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/ci.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 325daaa4..886d0949 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:204b7af96e6d481f19b0ff377aa379d46bc56dd06e1cc7c523f361dd9cbfeeaa + digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 93b337c6..05de1f60 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -53,7 +53,7 @@ jobs: - uses: actions/setup-java@v2 with: distribution: zulu - java-version: 8 + java-version: 11 - run: java -version - run: .kokoro/build.sh env: From 07f21011acaa7cc57ea71cab04f38edacb5204b8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 9 Nov 2021 17:54:16 +0100 Subject: [PATCH 018/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.1 (#114) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.0` -> `1.2.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.1/compatibility-slim/1.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.1/confidence-slim/1.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.1`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​121-httpswwwgithubcomgoogleapisjava-shared-configcomparev120v121-2021-11-08) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.0...v1.2.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 5c14f0e1..474dae56 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 7fdd19a5..ebd48c2f 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.0 + 1.2.1 From 24a40256fc000622bf04bb58d0877ff14dc35722 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 10 Nov 2021 21:06:25 +0000 Subject: [PATCH 019/203] chore: update Java and Python dependencies (#116) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408420890 Source-Link: https://github.com/googleapis/googleapis/commit/2921f9fb3bfbd16f6b2da0104373e2b47a80a65e Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 --- ...inauthzManagementServiceV1Beta1Client.java | 14 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 265 ++ .../v1beta1/SystemPolicyV1Beta1Settings.java | 184 ++ .../v1beta1/gapic_metadata.json | 12 + .../v1beta1/package-info.java | 15 +- ...rpcSystemPolicyV1Beta1CallableFactory.java | 115 + .../stub/GrpcSystemPolicyV1Beta1Stub.java | 165 ++ .../v1beta1/stub/SystemPolicyV1Beta1Stub.java | 42 + .../stub/SystemPolicyV1Beta1StubSettings.java | 266 ++ ...thzManagementServiceV1Beta1ClientTest.java | 19 +- .../v1beta1/MockSystemPolicyV1Beta1.java | 59 + .../v1beta1/MockSystemPolicyV1Beta1Impl.java | 81 + .../SystemPolicyV1Beta1ClientTest.java | 172 ++ .../v1/BinauthzManagementServiceV1Grpc.java | 1 + .../v1/SystemPolicyV1Grpc.java | 1 + .../v1/ValidationHelperV1Grpc.java | 1 + .../BinauthzManagementServiceV1Beta1Grpc.java | 193 +- .../v1beta1/SystemPolicyV1Beta1Grpc.java | 369 +++ .../v1beta1/AdmissionRule.java | 28 +- .../v1beta1/AdmissionWhitelistPattern.java | 68 +- .../AdmissionWhitelistPatternOrBuilder.java | 16 +- .../binaryauthorization/v1beta1/Attestor.java | 12 +- .../v1beta1/AttestorPublicKey.java | 10 +- .../BinaryAuthorizationResourcesProto.java | 207 +- .../BinaryAuthorizationServiceProto.java | 114 +- .../v1beta1/CreateAttestorRequest.java | 138 +- .../CreateAttestorRequestOrBuilder.java | 36 +- .../v1beta1/DeleteAttestorRequest.java | 35 +- .../DeleteAttestorRequestOrBuilder.java | 10 +- .../v1beta1/GetAttestorRequest.java | 35 +- .../v1beta1/GetAttestorRequestOrBuilder.java | 10 +- .../v1beta1/GetPolicyRequest.java | 35 +- .../v1beta1/GetPolicyRequestOrBuilder.java | 10 +- .../v1beta1/GetSystemPolicyRequest.java | 669 +++++ .../GetSystemPolicyRequestOrBuilder.java | 56 + .../v1beta1/ListAttestorsRequest.java | 56 +- .../ListAttestorsRequestOrBuilder.java | 16 +- .../v1beta1/ListAttestorsResponse.java | 35 +- .../ListAttestorsResponseOrBuilder.java | 10 +- .../v1beta1/PkixPublicKey.java | 118 +- .../binaryauthorization/v1beta1/Policy.java | 2504 ++++++++++++----- .../v1beta1/PolicyName.java | 100 +- .../v1beta1/PolicyOrBuilder.java | 240 ++ .../v1beta1/UpdateAttestorRequest.java | 108 +- .../UpdateAttestorRequestOrBuilder.java | 27 +- .../v1beta1/UpdatePolicyRequest.java | 96 +- .../v1beta1/UpdatePolicyRequestOrBuilder.java | 24 +- .../v1beta1/UserOwnedDrydockNote.java | 10 +- .../v1beta1/resources.proto | 116 +- .../binaryauthorization/v1beta1/service.proto | 139 +- 50 files changed, 5521 insertions(+), 1541 deletions(-) create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java create mode 100644 grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java create mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java create mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index 99b13ea5..fd504420 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -52,7 +52,7 @@ *
{@code
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.of("[PROJECT]");
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
  * }
  * }
@@ -181,7 +181,7 @@ public BinauthzManagementServiceV1Beta1Stub getStub() { *
{@code
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   PolicyName name = PolicyName.of("[PROJECT]");
+   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
    *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
    * }
    * }
@@ -213,7 +213,7 @@ public final Policy getPolicy(PolicyName name) { *
{@code
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String name = PolicyName.of("[PROJECT]").toString();
+   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
    *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
    * }
    * }
@@ -245,7 +245,9 @@ public final Policy getPolicy(String name) { * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = * BinauthzManagementServiceV1Beta1Client.create()) { * GetPolicyRequest request = - * GetPolicyRequest.newBuilder().setName(PolicyName.of("[PROJECT]").toString()).build(); + * GetPolicyRequest.newBuilder() + * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .build(); * Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(request); * } * } @@ -274,7 +276,9 @@ public final Policy getPolicy(GetPolicyRequest request) { * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = * BinauthzManagementServiceV1Beta1Client.create()) { * GetPolicyRequest request = - * GetPolicyRequest.newBuilder().setName(PolicyName.of("[PROJECT]").toString()).build(); + * GetPolicyRequest.newBuilder() + * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .build(); * ApiFuture future = * binauthzManagementServiceV1Beta1Client.getPolicyCallable().futureCall(request); * // Do something. diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java new file mode 100644 index 00000000..ae6effb1 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -0,0 +1,265 @@ +/* + * 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.binaryauthorization.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1Stub; +import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: API for working with the system policy. + * + *

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 (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
+ *     SystemPolicyV1Beta1Settings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
+ *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
+ *     SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
+ * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
+ *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
+ * }
+ * + *

Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class SystemPolicyV1Beta1Client implements BackgroundResource { + private final SystemPolicyV1Beta1Settings settings; + private final SystemPolicyV1Beta1Stub stub; + + /** Constructs an instance of SystemPolicyV1Beta1Client with default settings. */ + public static final SystemPolicyV1Beta1Client create() throws IOException { + return create(SystemPolicyV1Beta1Settings.newBuilder().build()); + } + + /** + * Constructs an instance of SystemPolicyV1Beta1Client, 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 SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Settings settings) + throws IOException { + return new SystemPolicyV1Beta1Client(settings); + } + + /** + * Constructs an instance of SystemPolicyV1Beta1Client, using the given stub for making calls. + * This is for advanced usage - prefer using create(SystemPolicyV1Beta1Settings). + */ + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public static final SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Stub stub) { + return new SystemPolicyV1Beta1Client(stub); + } + + /** + * Constructs an instance of SystemPolicyV1Beta1Client, 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 SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Settings settings) throws IOException { + this.settings = settings; + this.stub = ((SystemPolicyV1Beta1StubSettings) settings.getStubSettings()).createStub(); + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + protected SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Stub stub) { + this.settings = null; + this.stub = stub; + } + + public final SystemPolicyV1Beta1Settings getSettings() { + return settings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SystemPolicyV1Beta1Stub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name, in the format `locations/*/policy`. Note that the + * system policy is not associated with a project. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getSystemPolicy(PolicyName name) { + GetSystemPolicyRequest request = + GetSystemPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getSystemPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
+   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
+   * }
+   * }
+ * + * @param name Required. The resource name, in the format `locations/*/policy`. Note that the + * system policy is not associated with a project. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getSystemPolicy(String name) { + GetSystemPolicyRequest request = GetSystemPolicyRequest.newBuilder().setName(name).build(); + return getSystemPolicy(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+   *   GetSystemPolicyRequest request =
+   *       GetSystemPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(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 Policy getSystemPolicy(GetSystemPolicyRequest request) { + return getSystemPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the current system policy in the specified location. + * + *

Sample code: + * + *

{@code
+   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+   *   GetSystemPolicyRequest request =
+   *       GetSystemPolicyRequest.newBuilder()
+   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
+   *           .build();
+   *   ApiFuture future =
+   *       systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request);
+   *   // Do something.
+   *   Policy response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getSystemPolicyCallable() { + return stub.getSystemPolicyCallable(); + } + + @Override + public final void close() { + stub.close(); + } + + @Override + public void shutdown() { + stub.shutdown(); + } + + @Override + public boolean isShutdown() { + return stub.isShutdown(); + } + + @Override + public boolean isTerminated() { + return stub.isTerminated(); + } + + @Override + public void shutdownNow() { + stub.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return stub.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java new file mode 100644 index 00000000..c81c09d1 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java @@ -0,0 +1,184 @@ +/* + * 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.binaryauthorization.v1beta1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; +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 SystemPolicyV1Beta1Client}. + * + *

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

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

{@code
+ * SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder =
+ *     SystemPolicyV1Beta1Settings.newBuilder();
+ * systemPolicyV1Beta1SettingsBuilder
+ *     .getSystemPolicySettings()
+ *     .setRetrySettings(
+ *         systemPolicyV1Beta1SettingsBuilder
+ *             .getSystemPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
+ *     systemPolicyV1Beta1SettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SystemPolicyV1Beta1Settings extends ClientSettings { + + /** Returns the object with the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings getSystemPolicySettings() { + return ((SystemPolicyV1Beta1StubSettings) getStubSettings()).getSystemPolicySettings(); + } + + public static final SystemPolicyV1Beta1Settings create(SystemPolicyV1Beta1StubSettings stub) + throws IOException { + return new SystemPolicyV1Beta1Settings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return SystemPolicyV1Beta1StubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return SystemPolicyV1Beta1StubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return SystemPolicyV1Beta1StubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.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 SystemPolicyV1Beta1Settings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for SystemPolicyV1Beta1Settings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(SystemPolicyV1Beta1StubSettings.newBuilder(clientContext)); + } + + protected Builder(SystemPolicyV1Beta1Settings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(SystemPolicyV1Beta1StubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(SystemPolicyV1Beta1StubSettings.newBuilder()); + } + + public SystemPolicyV1Beta1StubSettings.Builder getStubSettingsBuilder() { + return ((SystemPolicyV1Beta1StubSettings.Builder) getStubSettings()); + } + + /** + * 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) { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings.Builder getSystemPolicySettings() { + return getStubSettingsBuilder().getSystemPolicySettings(); + } + + @Override + public SystemPolicyV1Beta1Settings build() throws IOException { + return new SystemPolicyV1Beta1Settings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json index 50e7b6d0..ec84086e 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json @@ -34,6 +34,18 @@ } } } + }, + "SystemPolicyV1Beta1": { + "clients": { + "grpc": { + "libraryClient": "SystemPolicyV1Beta1Client", + "rpcs": { + "GetSystemPolicy": { + "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"] + } + } + } + } } } } \ No newline at end of file diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java index 44e936c3..5bf3f916 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java @@ -34,10 +34,23 @@ *

{@code
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.of("[PROJECT]");
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
  * }
  * }
+ * + *

======================= SystemPolicyV1Beta1Client ======================= + * + *

Service Description: API for working with the system policy. + * + *

Sample for SystemPolicyV1Beta1Client: + * + *

{@code
+ * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
+ *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
+ *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
+ * }
+ * }
*/ @Generated("by gapic-generator-java") package com.google.cloud.binaryauthorization.v1beta1; diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java new file mode 100644 index 00000000..bd636c07 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcCallableFactory; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.BidiStreamingCallable; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientStreamingCallable; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.StreamingCallSettings; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.OperationsStub; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC callable factory implementation for the SystemPolicyV1Beta1 service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSystemPolicyV1Beta1CallableFactory 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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java new file mode 100644 index 00000000..33bf36ce --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java @@ -0,0 +1,165 @@ +/* + * 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.stub.GrpcOperationsStub; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the SystemPolicyV1Beta1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcSystemPolicyV1Beta1Stub extends SystemPolicyV1Beta1Stub { + private static final MethodDescriptor + getSystemPolicyMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy") + .setRequestMarshaller( + ProtoUtils.marshaller(GetSystemPolicyRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .build(); + + private final UnaryCallable getSystemPolicyCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcSystemPolicyV1Beta1Stub create(SystemPolicyV1Beta1StubSettings settings) + throws IOException { + return new GrpcSystemPolicyV1Beta1Stub(settings, ClientContext.create(settings)); + } + + public static final GrpcSystemPolicyV1Beta1Stub create(ClientContext clientContext) + throws IOException { + return new GrpcSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcSystemPolicyV1Beta1Stub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcSystemPolicyV1Beta1CallableFactory()); + } + + /** + * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings getSystemPolicyTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getSystemPolicyMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.getSystemPolicyCallable = + callableFactory.createUnaryCallable( + getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable getSystemPolicyCallable() { + return getSystemPolicyCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java new file mode 100644 index 00000000..4ecfc173 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java @@ -0,0 +1,42 @@ +/* + * 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Base stub class for the SystemPolicyV1Beta1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class SystemPolicyV1Beta1Stub implements BackgroundResource { + + public UnaryCallable getSystemPolicyCallable() { + throw new UnsupportedOperationException("Not implemented: getSystemPolicyCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java new file mode 100644 index 00000000..a45e3cd8 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java @@ -0,0 +1,266 @@ +/* + * 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +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 java.io.IOException; +import java.util.List; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link SystemPolicyV1Beta1Stub}. + * + *

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

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

{@code
+ * SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
+ *     SystemPolicyV1Beta1StubSettings.newBuilder();
+ * systemPolicyV1Beta1SettingsBuilder
+ *     .getSystemPolicySettings()
+ *     .setRetrySettings(
+ *         systemPolicyV1Beta1SettingsBuilder
+ *             .getSystemPolicySettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * SystemPolicyV1Beta1StubSettings systemPolicyV1Beta1Settings =
+ *     systemPolicyV1Beta1SettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class SystemPolicyV1Beta1StubSettings 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 getSystemPolicySettings; + + /** Returns the object with the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings getSystemPolicySettings() { + return getSystemPolicySettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public SystemPolicyV1Beta1Stub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcSystemPolicyV1Beta1Stub.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 "binaryauthorization.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "binaryauthorization.mtls.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) + .setUseJwtAccessWithScope(true); + } + + /** 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(SystemPolicyV1Beta1StubSettings.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 SystemPolicyV1Beta1StubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + getSystemPolicySettings = settingsBuilder.getSystemPolicySettings().build(); + } + + /** Builder for SystemPolicyV1Beta1StubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder getSystemPolicySettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); + definitions.put("no_retry_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + getSystemPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(getSystemPolicySettings); + initDefaults(this); + } + + protected Builder(SystemPolicyV1Beta1StubSettings settings) { + super(settings); + + getSystemPolicySettings = settings.getSystemPolicySettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of(getSystemPolicySettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .getSystemPolicySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + return builder; + } + + /** + * 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) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to getSystemPolicy. */ + public UnaryCallSettings.Builder getSystemPolicySettings() { + return getSystemPolicySettings; + } + + @Override + public SystemPolicyV1Beta1StubSettings build() throws IOException { + return new SystemPolicyV1Beta1StubSettings(this); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java index 6f97d6db..dc2a6ab8 100644 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java @@ -87,16 +87,19 @@ public void tearDown() throws Exception { public void getPolicyTest() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.of("[PROJECT]").toString()) + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .build(); mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - PolicyName name = PolicyName.of("[PROJECT]"); + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); Policy actualResponse = client.getPolicy(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -118,7 +121,7 @@ public void getPolicyExceptionTest() throws Exception { mockBinauthzManagementServiceV1Beta1.addException(exception); try { - PolicyName name = PolicyName.of("[PROJECT]"); + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); client.getPolicy(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -130,10 +133,13 @@ public void getPolicyExceptionTest() throws Exception { public void getPolicyTest2() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.of("[PROJECT]").toString()) + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .build(); @@ -173,10 +179,13 @@ public void getPolicyExceptionTest2() throws Exception { public void updatePolicyTest() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.of("[PROJECT]").toString()) + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) .setUpdateTime(Timestamp.newBuilder().build()) .build(); diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java new file mode 100644 index 00000000..0facc763 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.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.binaryauthorization.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.protobuf.AbstractMessage; +import io.grpc.ServerServiceDefinition; +import java.util.List; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockSystemPolicyV1Beta1 implements MockGrpcService { + private final MockSystemPolicyV1Beta1Impl serviceImpl; + + public MockSystemPolicyV1Beta1() { + serviceImpl = new MockSystemPolicyV1Beta1Impl(); + } + + @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-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java new file mode 100644 index 00000000..1d017ee4 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java @@ -0,0 +1,81 @@ +/* + * 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.binaryauthorization.v1beta1; + +import com.google.api.core.BetaApi; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Grpc.SystemPolicyV1Beta1ImplBase; +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 MockSystemPolicyV1Beta1Impl extends SystemPolicyV1Beta1ImplBase { + private List requests; + private Queue responses; + + public MockSystemPolicyV1Beta1Impl() { + 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 getSystemPolicy( + GetSystemPolicyRequest request, StreamObserver responseObserver) { + Object response = responses.poll(); + if (response instanceof Policy) { + requests.add(request); + responseObserver.onNext(((Policy) 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 GetSystemPolicy, expected %s or %s", + response == null ? "null" : response.getClass().getName(), + Policy.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java new file mode 100644 index 00000000..0b610ca0 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java @@ -0,0 +1,172 @@ +/* + * 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.binaryauthorization.v1beta1; + +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.protobuf.AbstractMessage; +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 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 SystemPolicyV1Beta1ClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockSystemPolicyV1Beta1 mockSystemPolicyV1Beta1; + private LocalChannelProvider channelProvider; + private SystemPolicyV1Beta1Client client; + + @BeforeClass + public static void startStaticServer() { + mockSystemPolicyV1Beta1 = new MockSystemPolicyV1Beta1(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockSystemPolicyV1Beta1)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + SystemPolicyV1Beta1Settings settings = + SystemPolicyV1Beta1Settings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SystemPolicyV1Beta1Client.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void getSystemPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockSystemPolicyV1Beta1.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + + Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSystemPolicyV1Beta1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSystemPolicyRequest actualRequest = ((GetSystemPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSystemPolicyExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSystemPolicyV1Beta1.addException(exception); + + try { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSystemPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockSystemPolicyV1Beta1.addResponse(expectedResponse); + + String name = "name3373707"; + + Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockSystemPolicyV1Beta1.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetSystemPolicyRequest actualRequest = ((GetSystemPolicyRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getSystemPolicyExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockSystemPolicyV1Beta1.addException(exception); + + try { + String name = "name3373707"; + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java index fc8523b2..9d1b55fd 100644 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java @@ -31,6 +31,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class BinauthzManagementServiceV1Grpc { private BinauthzManagementServiceV1Grpc() {} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java index 72939535..d43a1905 100644 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class SystemPolicyV1Grpc { private SystemPolicyV1Grpc() {} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java index 30e0c3d1..a20a6069 100644 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class ValidationHelperV1Grpc { private ValidationHelperV1Grpc() {} diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java index f190dd9e..2ba1ef37 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java @@ -31,6 +31,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class BinauthzManagementServiceV1Beta1Grpc { private BinauthzManagementServiceV1Beta1Grpc() {} @@ -446,15 +447,12 @@ public abstract static class BinauthzManagementServiceV1Beta1ImplBase * * *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must
-     * attest to a container image, before the project is allowed to deploy that
+     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
      * image. There is at most one policy per project. All image admission
      * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this
-     * project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project
-     * does not have one.
+     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
      * 
*/ public void getPolicy( @@ -468,13 +466,11 @@ public void getPolicy( * * *
-     * Creates or updates a project's
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a
-     * copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy].
-     * A policy is always updated as a whole, to avoid race conditions with
-     * concurrent policy enforcement (or management!) requests. Returns NOT_FOUND
-     * if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed.
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
      * 
*/ public void updatePolicy( @@ -489,13 +485,10 @@ public void updatePolicy( * * *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor],
-     * and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns
-     * NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already
-     * exists.
+     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
      * 
*/ public void createAttestor( @@ -511,9 +504,7 @@ public void createAttestor( * *
      * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void getAttestor( @@ -529,9 +520,7 @@ public void getAttestor( * *
      * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void updateAttestor( @@ -563,10 +552,8 @@ public void listAttestors( * * *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void deleteAttestor( @@ -659,15 +646,12 @@ protected BinauthzManagementServiceV1Beta1Stub build( * * *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must
-     * attest to a container image, before the project is allowed to deploy that
+     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
      * image. There is at most one policy per project. All image admission
      * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this
-     * project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project
-     * does not have one.
+     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
      * 
*/ public void getPolicy( @@ -682,13 +666,11 @@ public void getPolicy( * * *
-     * Creates or updates a project's
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a
-     * copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy].
-     * A policy is always updated as a whole, to avoid race conditions with
-     * concurrent policy enforcement (or management!) requests. Returns NOT_FOUND
-     * if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed.
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
      * 
*/ public void updatePolicy( @@ -705,13 +687,10 @@ public void updatePolicy( * * *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor],
-     * and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns
-     * NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already
-     * exists.
+     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
      * 
*/ public void createAttestor( @@ -729,9 +708,7 @@ public void createAttestor( * *
      * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void getAttestor( @@ -749,9 +726,7 @@ public void getAttestor( * *
      * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void updateAttestor( @@ -787,10 +762,8 @@ public void listAttestors( * * *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public void deleteAttestor( @@ -831,15 +804,12 @@ protected BinauthzManagementServiceV1Beta1BlockingStub build( * * *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must
-     * attest to a container image, before the project is allowed to deploy that
+     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
      * image. There is at most one policy per project. All image admission
      * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this
-     * project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project
-     * does not have one.
+     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
      * 
*/ public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy( @@ -852,13 +822,11 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy( * * *
-     * Creates or updates a project's
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a
-     * copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy].
-     * A policy is always updated as a whole, to avoid race conditions with
-     * concurrent policy enforcement (or management!) requests. Returns NOT_FOUND
-     * if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed.
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
      * 
*/ public com.google.cloud.binaryauthorization.v1beta1.Policy updatePolicy( @@ -871,13 +839,10 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy updatePolicy( * * *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor],
-     * and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns
-     * NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already
-     * exists.
+     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
      * 
*/ public com.google.cloud.binaryauthorization.v1beta1.Attestor createAttestor( @@ -891,9 +856,7 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor createAttestor( * *
      * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor( @@ -907,9 +870,7 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor( * *
      * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.cloud.binaryauthorization.v1beta1.Attestor updateAttestor( @@ -936,10 +897,8 @@ public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse listAt * * *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.protobuf.Empty deleteAttestor( @@ -977,15 +936,12 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * * *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must
-     * attest to a container image, before the project is allowed to deploy that
+     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
+     * a container image, before the project is allowed to deploy that
      * image. There is at most one policy per project. All image admission
      * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this
-     * project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project
-     * does not have one.
+     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
+     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -999,13 +955,11 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * * *
-     * Creates or updates a project's
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a
-     * copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy].
-     * A policy is always updated as a whole, to avoid race conditions with
-     * concurrent policy enforcement (or management!) requests. Returns NOT_FOUND
-     * if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed.
+     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
+     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
+     * conditions with concurrent policy enforcement (or management!)
+     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
+     * if the request is malformed.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1019,13 +973,10 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * * *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor],
-     * and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns
-     * NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is
-     * malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already
-     * exists.
+     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
+     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1040,9 +991,7 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * *
      * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1057,9 +1006,7 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * *
      * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -1088,10 +1035,8 @@ protected BinauthzManagementServiceV1Beta1FutureStub build( * * *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not
-     * exist.
+     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
+     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java new file mode 100644 index 00000000..3ae0b37b --- /dev/null +++ b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java @@ -0,0 +1,369 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * API for working with the system policy.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class SystemPolicyV1Beta1Grpc { + + private SystemPolicyV1Beta1Grpc() {} + + public static final String SERVICE_NAME = + "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, + com.google.cloud.binaryauthorization.v1beta1.Policy> + getGetSystemPolicyMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetSystemPolicy", + requestType = com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, + responseType = com.google.cloud.binaryauthorization.v1beta1.Policy.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, + com.google.cloud.binaryauthorization.v1beta1.Policy> + getGetSystemPolicyMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, + com.google.cloud.binaryauthorization.v1beta1.Policy> + getGetSystemPolicyMethod; + if ((getGetSystemPolicyMethod = SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod) == null) { + synchronized (SystemPolicyV1Beta1Grpc.class) { + if ((getGetSystemPolicyMethod = SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod) == null) { + SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod = + getGetSystemPolicyMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSystemPolicy")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.binaryauthorization.v1beta1.Policy + .getDefaultInstance())) + .setSchemaDescriptor( + new SystemPolicyV1Beta1MethodDescriptorSupplier("GetSystemPolicy")) + .build(); + } + } + } + return getGetSystemPolicyMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static SystemPolicyV1Beta1Stub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1Beta1Stub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1Stub(channel, callOptions); + } + }; + return SystemPolicyV1Beta1Stub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static SystemPolicyV1Beta1BlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1Beta1BlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1BlockingStub(channel, callOptions); + } + }; + return SystemPolicyV1Beta1BlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static SystemPolicyV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public SystemPolicyV1Beta1FutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1FutureStub(channel, callOptions); + } + }; + return SystemPolicyV1Beta1FutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public abstract static class SystemPolicyV1Beta1ImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public void getSystemPolicy( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getGetSystemPolicyMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getGetSystemPolicyMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, + com.google.cloud.binaryauthorization.v1beta1.Policy>( + this, METHODID_GET_SYSTEM_POLICY))) + .build(); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1Beta1Stub + extends io.grpc.stub.AbstractAsyncStub { + private SystemPolicyV1Beta1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1Beta1Stub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1Stub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public void getSystemPolicy( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1Beta1BlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private SystemPolicyV1Beta1BlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1Beta1BlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1BlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public com.google.cloud.binaryauthorization.v1beta1.Policy getSystemPolicy( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetSystemPolicyMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * API for working with the system policy.
+   * 
+ */ + public static final class SystemPolicyV1Beta1FutureStub + extends io.grpc.stub.AbstractFutureStub { + private SystemPolicyV1Beta1FutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected SystemPolicyV1Beta1FutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new SystemPolicyV1Beta1FutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Gets the current system policy in the specified location.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.binaryauthorization.v1beta1.Policy> + getSystemPolicy( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_GET_SYSTEM_POLICY = 0; + + 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 SystemPolicyV1Beta1ImplBase serviceImpl; + private final int methodId; + + MethodHandlers(SystemPolicyV1Beta1ImplBase 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_GET_SYSTEM_POLICY: + serviceImpl.getSystemPolicy( + (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private abstract static class SystemPolicyV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + SystemPolicyV1Beta1BaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("SystemPolicyV1Beta1"); + } + } + + private static final class SystemPolicyV1Beta1FileDescriptorSupplier + extends SystemPolicyV1Beta1BaseDescriptorSupplier { + SystemPolicyV1Beta1FileDescriptorSupplier() {} + } + + private static final class SystemPolicyV1Beta1MethodDescriptorSupplier + extends SystemPolicyV1Beta1BaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + SystemPolicyV1Beta1MethodDescriptorSupplier(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 (SystemPolicyV1Beta1Grpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new SystemPolicyV1Beta1FileDescriptorSupplier()) + .addMethod(getGetSystemPolicyMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java index efa1500c..b2f9c2ea 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java @@ -22,13 +22,11 @@ * * *
- * An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule]
- * specifies either that all container images used in a pod creation request
- * must be attested to by one or more
- * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod
- * creations will be allowed, or that all pod creations will be denied.
- * Images matching an [admission allowlist
- * pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
+ * An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images
+ * used in a pod creation request must be attested to by one or more
+ * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all
+ * pod creations will be denied.
+ * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
  * are exempted from admission rules and will never block a pod creation.
  * 
* @@ -168,7 +166,7 @@ public enum EvaluationMode implements com.google.protobuf.ProtocolMessageEnum { * *
      * This rule allows a pod creation if all the attestors listed in
-     * 'require_attestations_by' have valid attestations for all of the
+     * `require_attestations_by` have valid attestations for all of the
      * images in the pod spec.
      * 
* @@ -213,7 +211,7 @@ public enum EvaluationMode implements com.google.protobuf.ProtocolMessageEnum { * *
      * This rule allows a pod creation if all the attestors listed in
-     * 'require_attestations_by' have valid attestations for all of the
+     * `require_attestations_by` have valid attestations for all of the
      * images in the pod spec.
      * 
* @@ -861,13 +859,11 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule]
-   * specifies either that all container images used in a pod creation request
-   * must be attested to by one or more
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod
-   * creations will be allowed, or that all pod creations will be denied.
-   * Images matching an [admission allowlist
-   * pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
+   * An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images
+   * used in a pod creation request must be attested to by one or more
+   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all
+   * pod creations will be denied.
+   * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
    * are exempted from admission rules and will never block a pod creation.
    * 
* diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java index e0831600..7e524017 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java @@ -22,10 +22,8 @@ * * *
- * An [admission allowlist
- * pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
- * exempts images from checks by [admission
- * rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
+ * An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images
+ * from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
  * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern} @@ -120,9 +118,13 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * An image name pattern to allow, in the form `registry/path/to/image`.
+   * An image name pattern to allowlist, in the form `registry/path/to/image`.
    * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part.
+   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+   * matches subdirectories, i.e., `gcr.io/nginx**` matches
+   * `gcr.io/nginx/image`.
    * 
* * string name_pattern = 1; @@ -145,9 +147,13 @@ public java.lang.String getNamePattern() { * * *
-   * An image name pattern to allow, in the form `registry/path/to/image`.
+   * An image name pattern to allowlist, in the form `registry/path/to/image`.
    * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part.
+   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+   * matches subdirectories, i.e., `gcr.io/nginx**` matches
+   * `gcr.io/nginx/image`.
    * 
* * string name_pattern = 1; @@ -332,10 +338,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An [admission allowlist
-   * pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
-   * exempts images from checks by [admission
-   * rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
+   * An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images
+   * from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
    * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern} @@ -503,9 +507,13 @@ public Builder mergeFrom( * * *
-     * An image name pattern to allow, in the form `registry/path/to/image`.
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
      * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part.
+     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+     * matches subdirectories, i.e., `gcr.io/nginx**` matches
+     * `gcr.io/nginx/image`.
      * 
* * string name_pattern = 1; @@ -527,9 +535,13 @@ public java.lang.String getNamePattern() { * * *
-     * An image name pattern to allow, in the form `registry/path/to/image`.
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
      * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part.
+     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+     * matches subdirectories, i.e., `gcr.io/nginx**` matches
+     * `gcr.io/nginx/image`.
      * 
* * string name_pattern = 1; @@ -551,9 +563,13 @@ public com.google.protobuf.ByteString getNamePatternBytes() { * * *
-     * An image name pattern to allow, in the form `registry/path/to/image`.
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
      * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part.
+     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+     * matches subdirectories, i.e., `gcr.io/nginx**` matches
+     * `gcr.io/nginx/image`.
      * 
* * string name_pattern = 1; @@ -574,9 +590,13 @@ public Builder setNamePattern(java.lang.String value) { * * *
-     * An image name pattern to allow, in the form `registry/path/to/image`.
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
      * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part.
+     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+     * matches subdirectories, i.e., `gcr.io/nginx**` matches
+     * `gcr.io/nginx/image`.
      * 
* * string name_pattern = 1; @@ -593,9 +613,13 @@ public Builder clearNamePattern() { * * *
-     * An image name pattern to allow, in the form `registry/path/to/image`.
+     * An image name pattern to allowlist, in the form `registry/path/to/image`.
      * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part.
+     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+     * matches subdirectories, i.e., `gcr.io/nginx**` matches
+     * `gcr.io/nginx/image`.
      * 
* * string name_pattern = 1; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java index b45118d1..df874f7e 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java @@ -27,9 +27,13 @@ public interface AdmissionWhitelistPatternOrBuilder * * *
-   * An image name pattern to allow, in the form `registry/path/to/image`.
+   * An image name pattern to allowlist, in the form `registry/path/to/image`.
    * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part.
+   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+   * matches subdirectories, i.e., `gcr.io/nginx**` matches
+   * `gcr.io/nginx/image`.
    * 
* * string name_pattern = 1; @@ -41,9 +45,13 @@ public interface AdmissionWhitelistPatternOrBuilder * * *
-   * An image name pattern to allow, in the form `registry/path/to/image`.
+   * An image name pattern to allowlist, in the form `registry/path/to/image`.
    * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part.
+   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
+   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
+   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
+   * matches subdirectories, i.e., `gcr.io/nginx**` matches
+   * `gcr.io/nginx/image`.
    * 
* * string name_pattern = 1; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java index e51745db..d85e7c13 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java @@ -22,9 +22,9 @@ * * *
- * An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests
- * to container image artifacts. An existing attestor cannot be modified except
- * where indicated.
+ * An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image
+ * artifacts. An existing attestor cannot be modified except where
+ * indicated.
  * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Attestor} @@ -625,9 +625,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests
-   * to container image artifacts. An existing attestor cannot be modified except
-   * where indicated.
+   * An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image
+   * artifacts. An existing attestor cannot be modified except where
+   * indicated.
    * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Attestor} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java index 43f719bb..0c9b1afa 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java @@ -22,9 +22,8 @@ * * *
- * An [attestor public
- * key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be
- * used to verify attestations signed by this attestor.
+ * An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify
+ * attestations signed by this attestor.
  * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AttestorPublicKey} @@ -672,9 +671,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An [attestor public
-   * key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be
-   * used to verify attestations signed by this attestor.
+   * An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify
+   * attestations signed by this attestor.
    * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AttestorPublicKey} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java index bcf0febe..0b18140c 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java @@ -35,6 +35,18 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -70,10 +82,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n8google/cloud/binaryauthorization/v1bet" + "a1/resources.proto\022(google.cloud.binarya" - + "uthorization.v1beta1\032\034google/api/annotat" - + "ions.proto\032\037google/api/field_behavior.pr" - + "oto\032\031google/api/resource.proto\032\037google/p" - + "rotobuf/timestamp.proto\"\315\006\n\006Policy\022\021\n\004na" + + "uthorization.v1beta1\032\037google/api/field_b" + + "ehavior.proto\032\031google/api/resource.proto" + + "\032\037google/protobuf/timestamp.proto\032\034googl" + + "e/api/annotations.proto\"\261\r\n\006Policy\022\021\n\004na" + "me\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022" + "w\n\035global_policy_evaluation_mode\030\007 \001(\0162K" + ".google.cloud.binaryauthorization.v1beta" @@ -83,79 +95,103 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "1.AdmissionWhitelistPatternB\003\340A\001\022q\n\027clus" + "ter_admission_rules\030\003 \003(\0132K.google.cloud" + ".binaryauthorization.v1beta1.Policy.Clus" - + "terAdmissionRulesEntryB\003\340A\001\022\\\n\026default_a" - + "dmission_rule\030\004 \001(\01327.google.cloud.binar" - + "yauthorization.v1beta1.AdmissionRuleB\003\340A" - + "\002\0224\n\013update_time\030\005 \001(\0132\032.google.protobuf" - + ".TimestampB\003\340A\003\032u\n\032ClusterAdmissionRules" - + "Entry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.goog" + + "terAdmissionRulesEntryB\003\340A\001\022\212\001\n$kubernet" + + "es_namespace_admission_rules\030\n \003(\0132W.goo" + + "gle.cloud.binaryauthorization.v1beta1.Po" + + "licy.KubernetesNamespaceAdmissionRulesEn" + + "tryB\003\340A\001\022\225\001\n*kubernetes_service_account_" + + "admission_rules\030\010 \003(\0132\\.google.cloud.bin" + + "aryauthorization.v1beta1.Policy.Kubernet" + + "esServiceAccountAdmissionRulesEntryB\003\340A\001" + + "\022\215\001\n&istio_service_identity_admission_ru" + + "les\030\t \003(\0132X.google.cloud.binaryauthoriza" + + "tion.v1beta1.Policy.IstioServiceIdentity" + + "AdmissionRulesEntryB\003\340A\001\022\\\n\026default_admi" + + "ssion_rule\030\004 \001(\01327.google.cloud.binaryau" + + "thorization.v1beta1.AdmissionRuleB\003\340A\002\0224" + + "\n\013update_time\030\005 \001(\0132\032.google.protobuf.Ti" + + "mestampB\003\340A\003\032u\n\032ClusterAdmissionRulesEnt" + + "ry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google." + + "cloud.binaryauthorization.v1beta1.Admiss" + + "ionRule:\0028\001\032\201\001\n&KubernetesNamespaceAdmis" + + "sionRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001" + + "(\01327.google.cloud.binaryauthorization.v1" + + "beta1.AdmissionRule:\0028\001\032\206\001\n+KubernetesSe" + + "rviceAccountAdmissionRulesEntry\022\013\n\003key\030\001" + + " \001(\t\022F\n\005value\030\002 \001(\01327.google.cloud.binar" + + "yauthorization.v1beta1.AdmissionRule:\0028\001" + + "\032\202\001\n\'IstioServiceIdentityAdmissionRulesE" + + "ntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.googl" + + "e.cloud.binaryauthorization.v1beta1.Admi" + + "ssionRule:\0028\001\"d\n\032GlobalPolicyEvaluationM" + + "ode\022-\n)GLOBAL_POLICY_EVALUATION_MODE_UNS" + + "PECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007DISABLE\020\002:f\352Ac" + + "\n)binaryauthorization.googleapis.com/Pol" + + "icy\022\031projects/{project}/policy\022\033location" + + "s/{location}/policy\"1\n\031AdmissionWhitelis" + + "tPattern\022\024\n\014name_pattern\030\001 \001(\t\"\344\003\n\rAdmis" + + "sionRule\022d\n\017evaluation_mode\030\001 \001(\0162F.goog" + "le.cloud.binaryauthorization.v1beta1.Adm" - + "issionRule:\0028\001\"d\n\032GlobalPolicyEvaluation" - + "Mode\022-\n)GLOBAL_POLICY_EVALUATION_MODE_UN" - + "SPECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007DISABLE\020\002:I\352A" - + "F\n)binaryauthorization.googleapis.com/Po" - + "licy\022\031projects/{project}/policy\"1\n\031Admis" - + "sionWhitelistPattern\022\024\n\014name_pattern\030\001 \001" - + "(\t\"\344\003\n\rAdmissionRule\022d\n\017evaluation_mode\030" - + "\001 \001(\0162F.google.cloud.binaryauthorization" - + ".v1beta1.AdmissionRule.EvaluationModeB\003\340" - + "A\002\022$\n\027require_attestations_by\030\002 \003(\tB\003\340A\001" - + "\022f\n\020enforcement_mode\030\003 \001(\0162G.google.clou" - + "d.binaryauthorization.v1beta1.AdmissionR" - + "ule.EnforcementModeB\003\340A\002\"m\n\016EvaluationMo" - + "de\022\037\n\033EVALUATION_MODE_UNSPECIFIED\020\000\022\020\n\014A" - + "LWAYS_ALLOW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017" - + "\n\013ALWAYS_DENY\020\003\"p\n\017EnforcementMode\022 \n\034EN" - + "FORCEMENT_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCED" - + "_BLOCK_AND_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_L" - + "OG_ONLY\020\002\"\274\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A" - + "\002\022\030\n\013description\030\006 \001(\tB\003\340A\001\022a\n\027user_owne" - + "d_drydock_note\030\003 \001(\0132>.google.cloud.bina" - + "ryauthorization.v1beta1.UserOwnedDrydock" - + "NoteH\000\0224\n\013update_time\030\004 \001(\0132\032.google.pro" - + "tobuf.TimestampB\003\340A\003:Y\352AV\n+binaryauthori" - + "zation.googleapis.com/Attestor\022\'projects" - + "/{project}/attestors/{attestor}B\017\n\rattes" - + "tor_type\"\271\001\n\024UserOwnedDrydockNote\022\033\n\016not" - + "e_reference\030\001 \001(\tB\003\340A\002\022U\n\013public_keys\030\002 " - + "\003(\0132;.google.cloud.binaryauthorization.v" - + "1beta1.AttestorPublicKeyB\003\340A\001\022-\n delegat" - + "ion_service_account_email\030\003 \001(\tB\003\340A\003\"\365\003\n" - + "\rPkixPublicKey\022\026\n\016public_key_pem\030\001 \001(\t\022g" - + "\n\023signature_algorithm\030\002 \001(\0162J.google.clo" - + "ud.binaryauthorization.v1beta1.PkixPubli" - + "cKey.SignatureAlgorithm\"\342\002\n\022SignatureAlg" - + "orithm\022#\n\037SIGNATURE_ALGORITHM_UNSPECIFIE" - + "D\020\000\022\027\n\023RSA_PSS_2048_SHA256\020\001\022\027\n\023RSA_PSS_" - + "3072_SHA256\020\002\022\027\n\023RSA_PSS_4096_SHA256\020\003\022\027" - + "\n\023RSA_PSS_4096_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS" - + "1_2048_SHA256\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_S" - + "HA256\020\006\022\036\n\032RSA_SIGN_PKCS1_4096_SHA256\020\007\022" - + "\036\n\032RSA_SIGN_PKCS1_4096_SHA512\020\010\022\025\n\021ECDSA" - + "_P256_SHA256\020\t\022\025\n\021ECDSA_P384_SHA384\020\n\022\025\n" - + "\021ECDSA_P521_SHA512\020\013\"\277\001\n\021AttestorPublicK" - + "ey\022\024\n\007comment\030\001 \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034" - + "ascii_armored_pgp_public_key\030\003 \001(\tH\000\022R\n\017" - + "pkix_public_key\030\005 \001(\01327.google.cloud.bin" - + "aryauthorization.v1beta1.PkixPublicKeyH\000" - + "B\014\n\npublic_keyB\267\002\n,com.google.cloud.bina" - + "ryauthorization.v1beta1B!BinaryAuthoriza" - + "tionResourcesProtoP\001Z[google.golang.org/" - + "genproto/googleapis/cloud/binaryauthoriz" - + "ation/v1beta1;binaryauthorization\370\001\001\252\002(G" - + "oogle.Cloud.BinaryAuthorization.V1Beta1\312" - + "\002(Google\\Cloud\\BinaryAuthorization\\V1bet" - + "a1\352\002+Google::Cloud::BinaryAuthorization:" - + ":V1beta1b\006proto3" + + "issionRule.EvaluationModeB\003\340A\002\022$\n\027requir" + + "e_attestations_by\030\002 \003(\tB\003\340A\001\022f\n\020enforcem" + + "ent_mode\030\003 \001(\0162G.google.cloud.binaryauth" + + "orization.v1beta1.AdmissionRule.Enforcem" + + "entModeB\003\340A\002\"m\n\016EvaluationMode\022\037\n\033EVALUA" + + "TION_MODE_UNSPECIFIED\020\000\022\020\n\014ALWAYS_ALLOW\020" + + "\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013ALWAYS_DEN" + + "Y\020\003\"p\n\017EnforcementMode\022 \n\034ENFORCEMENT_MO" + + "DE_UNSPECIFIED\020\000\022 \n\034ENFORCED_BLOCK_AND_A" + + "UDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG_ONLY\020\002\"\274\002" + + "\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013descrip" + + "tion\030\006 \001(\tB\003\340A\001\022a\n\027user_owned_drydock_no" + + "te\030\003 \001(\0132>.google.cloud.binaryauthorizat" + + "ion.v1beta1.UserOwnedDrydockNoteH\000\0224\n\013up" + + "date_time\030\004 \001(\0132\032.google.protobuf.Timest" + + "ampB\003\340A\003:Y\352AV\n+binaryauthorization.googl" + + "eapis.com/Attestor\022\'projects/{project}/a" + + "ttestors/{attestor}B\017\n\rattestor_type\"\271\001\n" + + "\024UserOwnedDrydockNote\022\033\n\016note_reference\030" + + "\001 \001(\tB\003\340A\002\022U\n\013public_keys\030\002 \003(\0132;.google" + + ".cloud.binaryauthorization.v1beta1.Attes" + + "torPublicKeyB\003\340A\001\022-\n delegation_service_" + + "account_email\030\003 \001(\tB\003\340A\003\"\304\004\n\rPkixPublicK" + + "ey\022\026\n\016public_key_pem\030\001 \001(\t\022g\n\023signature_" + + "algorithm\030\002 \001(\0162J.google.cloud.binaryaut" + + "horization.v1beta1.PkixPublicKey.Signatu" + + "reAlgorithm\"\261\003\n\022SignatureAlgorithm\022#\n\037SI" + + "GNATURE_ALGORITHM_UNSPECIFIED\020\000\022\027\n\023RSA_P" + + "SS_2048_SHA256\020\001\022\027\n\023RSA_PSS_3072_SHA256\020" + + "\002\022\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023RSA_PSS_40" + + "96_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_2048_SHA25" + + "6\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032R" + + "SA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_" + + "PKCS1_4096_SHA512\020\010\022\025\n\021ECDSA_P256_SHA256" + + "\020\t\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n\021ECDSA_P38" + + "4_SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021E" + + "CDSA_P521_SHA512\020\013\022\027\n\023EC_SIGN_P521_SHA51" + + "2\020\013\032\002\020\001\"\277\001\n\021AttestorPublicKey\022\024\n\007comment" + + "\030\001 \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored" + + "_pgp_public_key\030\003 \001(\tH\000\022R\n\017pkix_public_k" + + "ey\030\005 \001(\01327.google.cloud.binaryauthorizat" + + "ion.v1beta1.PkixPublicKeyH\000B\014\n\npublic_ke" + + "yB\267\002\n,com.google.cloud.binaryauthorizati" + + "on.v1beta1B!BinaryAuthorizationResources" + + "ProtoP\001Z[google.golang.org/genproto/goog" + + "leapis/cloud/binaryauthorization/v1beta1" + + ";binaryauthorization\370\001\001\252\002(Google.Cloud.B" + + "inaryAuthorization.V1Beta1\312\002(Google\\Clou" + + "d\\BinaryAuthorization\\V1beta1\352\002+Google::" + + "Cloud::BinaryAuthorization::V1beta1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor = getDescriptor().getMessageTypes().get(0); @@ -168,6 +204,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "GlobalPolicyEvaluationMode", "AdmissionWhitelistPatterns", "ClusterAdmissionRules", + "KubernetesNamespaceAdmissionRules", + "KubernetesServiceAccountAdmissionRules", + "IstioServiceIdentityAdmissionRules", "DefaultAdmissionRule", "UpdateTime", }); @@ -181,6 +220,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Key", "Value", }); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor + .getNestedTypes() + .get(2); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor = + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor + .getNestedTypes() + .get(3); + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_fieldAccessorTable = @@ -235,10 +304,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { registry.add(com.google.api.ResourceProto.resource); com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java index bfb872a3..1837b906 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java @@ -59,6 +59,10 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { return descriptor; @@ -98,52 +102,62 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "eta1.Attestor\022\027\n\017next_page_token\030\002 \001(\t\"Z" + "\n\025DeleteAttestorRequest\022A\n\004name\030\001 \001(\tB3\340" + "A\002\372A-\n+binaryauthorization.googleapis.co" - + "m/Attestor2\313\013\n BinauthzManagementService" - + "V1Beta1\022\253\001\n\tGetPolicy\022:.google.cloud.bin" - + "aryauthorization.v1beta1.GetPolicyReques" - + "t\0320.google.cloud.binaryauthorization.v1b" - + "eta1.Policy\"0\202\323\344\223\002#\022!/v1beta1/{name=proj" - + "ects/*/policy}\332A\004name\022\302\001\n\014UpdatePolicy\022=" - + ".google.cloud.binaryauthorization.v1beta" - + "1.UpdatePolicyRequest\0320.google.cloud.bin" - + "aryauthorization.v1beta1.Policy\"A\202\323\344\223\0022\032" - + "(/v1beta1/{policy.name=projects/*/policy" - + "}:\006policy\332A\006policy\022\335\001\n\016CreateAttestor\022?." - + "google.cloud.binaryauthorization.v1beta1" - + ".CreateAttestorRequest\0322.google.cloud.bi" - + "naryauthorization.v1beta1.Attestor\"V\202\323\344\223" - + "\0022\"&/v1beta1/{parent=projects/*}/attesto" - + "rs:\010attestor\332A\033parent,attestor_id,attest" - + "or\022\266\001\n\013GetAttestor\022<.google.cloud.binary" - + "authorization.v1beta1.GetAttestorRequest" - + "\0322.google.cloud.binaryauthorization.v1be" - + "ta1.Attestor\"5\202\323\344\223\002(\022&/v1beta1/{name=pro" - + "jects/*/attestors/*}\332A\004name\022\323\001\n\016UpdateAt" - + "testor\022?.google.cloud.binaryauthorizatio" - + "n.v1beta1.UpdateAttestorRequest\0322.google" - + ".cloud.binaryauthorization.v1beta1.Attes" - + "tor\"L\202\323\344\223\002;\032//v1beta1/{attestor.name=pro" - + "jects/*/attestors/*}:\010attestor\332A\010attesto" - + "r\022\311\001\n\rListAttestors\022>.google.cloud.binar" - + "yauthorization.v1beta1.ListAttestorsRequ" - + "est\032?.google.cloud.binaryauthorization.v" - + "1beta1.ListAttestorsResponse\"7\202\323\344\223\002(\022&/v" - + "1beta1/{parent=projects/*}/attestors\332A\006p" - + "arent\022\240\001\n\016DeleteAttestor\022?.google.cloud." - + "binaryauthorization.v1beta1.DeleteAttest" - + "orRequest\032\026.google.protobuf.Empty\"5\202\323\344\223\002" - + "(*&/v1beta1/{name=projects/*/attestors/*" - + "}\332A\004name\032V\312A\"binaryauthorization.googlea" - + "pis.com\322A.https://www.googleapis.com/aut" - + "h/cloud-platformB\265\002\n,com.google.cloud.bi" - + "naryauthorization.v1beta1B\037BinaryAuthori" - + "zationServiceProtoP\001Z[google.golang.org/" - + "genproto/googleapis/cloud/binaryauthoriz" - + "ation/v1beta1;binaryauthorization\370\001\001\252\002(G" - + "oogle.Cloud.BinaryAuthorization.V1Beta1\312" - + "\002(Google\\Cloud\\BinaryAuthorization\\V1bet" - + "a1\352\002+Google::Cloud::BinaryAuthorization:" - + ":V1beta1b\006proto3" + + "m/Attestor\"Y\n\026GetSystemPolicyRequest\022?\n\004" + + "name\030\001 \001(\tB1\340A\002\372A+\n)binaryauthorization." + + "googleapis.com/Policy2\313\013\n BinauthzManage" + + "mentServiceV1Beta1\022\253\001\n\tGetPolicy\022:.googl" + + "e.cloud.binaryauthorization.v1beta1.GetP" + + "olicyRequest\0320.google.cloud.binaryauthor" + + "ization.v1beta1.Policy\"0\202\323\344\223\002#\022!/v1beta1" + + "/{name=projects/*/policy}\332A\004name\022\302\001\n\014Upd" + + "atePolicy\022=.google.cloud.binaryauthoriza" + + "tion.v1beta1.UpdatePolicyRequest\0320.googl" + + "e.cloud.binaryauthorization.v1beta1.Poli" + + "cy\"A\202\323\344\223\0022\032(/v1beta1/{policy.name=projec" + + "ts/*/policy}:\006policy\332A\006policy\022\335\001\n\016Create" + + "Attestor\022?.google.cloud.binaryauthorizat" + + "ion.v1beta1.CreateAttestorRequest\0322.goog" + + "le.cloud.binaryauthorization.v1beta1.Att" + + "estor\"V\202\323\344\223\0022\"&/v1beta1/{parent=projects" + + "/*}/attestors:\010attestor\332A\033parent,attesto" + + "r_id,attestor\022\266\001\n\013GetAttestor\022<.google.c" + + "loud.binaryauthorization.v1beta1.GetAtte" + + "storRequest\0322.google.cloud.binaryauthori" + + "zation.v1beta1.Attestor\"5\202\323\344\223\002(\022&/v1beta" + + "1/{name=projects/*/attestors/*}\332A\004name\022\323" + + "\001\n\016UpdateAttestor\022?.google.cloud.binarya" + + "uthorization.v1beta1.UpdateAttestorReque" + + "st\0322.google.cloud.binaryauthorization.v1" + + "beta1.Attestor\"L\202\323\344\223\002;\032//v1beta1/{attest" + + "or.name=projects/*/attestors/*}:\010attesto" + + "r\332A\010attestor\022\311\001\n\rListAttestors\022>.google." + + "cloud.binaryauthorization.v1beta1.ListAt" + + "testorsRequest\032?.google.cloud.binaryauth" + + "orization.v1beta1.ListAttestorsResponse\"" + + "7\202\323\344\223\002(\022&/v1beta1/{parent=projects/*}/at" + + "testors\332A\006parent\022\240\001\n\016DeleteAttestor\022?.go" + + "ogle.cloud.binaryauthorization.v1beta1.D" + + "eleteAttestorRequest\032\026.google.protobuf.E" + + "mpty\"5\202\323\344\223\002(*&/v1beta1/{name=projects/*/" + + "attestors/*}\332A\004name\032V\312A\"binaryauthorizat" + + "ion.googleapis.com\322A.https://www.googlea" + + "pis.com/auth/cloud-platform2\250\002\n\023SystemPo" + + "licyV1Beta1\022\270\001\n\017GetSystemPolicy\022@.google" + + ".cloud.binaryauthorization.v1beta1.GetSy" + + "stemPolicyRequest\0320.google.cloud.binarya" + + "uthorization.v1beta1.Policy\"1\202\323\344\223\002$\022\"/v1" + + "beta1/{name=locations/*/policy}\332A\004name\032V" + + "\312A\"binaryauthorization.googleapis.com\322A." + + "https://www.googleapis.com/auth/cloud-pl" + + "atformB\265\002\n,com.google.cloud.binaryauthor" + + "ization.v1beta1B\037BinaryAuthorizationServ" + + "iceProtoP\001Z[google.golang.org/genproto/g" + + "oogleapis/cloud/binaryauthorization/v1be" + + "ta1;binaryauthorization\370\001\001\252\002(Google.Clou" + + "d.BinaryAuthorization.V1Beta1\312\002(Google\\C" + + "loud\\BinaryAuthorization\\V1beta1\352\002+Googl" + + "e::Cloud::BinaryAuthorization::V1beta1b\006" + + "proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -221,6 +235,14 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", }); + internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor, + new java.lang.String[] { + "Name", + }); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(com.google.api.ClientProto.defaultHost); diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java index 0180b7fe..667e91b7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java @@ -142,8 +142,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The parent of this
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
    * 
* * @@ -168,8 +167,7 @@ public java.lang.String getParent() { * * *
-   * Required. The parent of this
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
    * 
* * @@ -197,8 +195,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-   * Required. The
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
    * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -221,8 +218,7 @@ public java.lang.String getAttestorId() { * * *
-   * Required. The
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
    * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -248,11 +244,9 @@ public com.google.protobuf.ByteString getAttestorIdBytes() { * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * @@ -269,11 +263,9 @@ public boolean hasAttestor() { * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * @@ -292,11 +284,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * @@ -684,8 +674,7 @@ public Builder mergeFrom( * * *
-     * Required. The parent of this
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
      * 
* * @@ -709,8 +698,7 @@ public java.lang.String getParent() { * * *
-     * Required. The parent of this
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
      * 
* * @@ -734,8 +722,7 @@ public com.google.protobuf.ByteString getParentBytes() { * * *
-     * Required. The parent of this
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
      * 
* * @@ -758,8 +745,7 @@ public Builder setParent(java.lang.String value) { * * *
-     * Required. The parent of this
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
      * 
* * @@ -778,8 +764,7 @@ public Builder clearParent() { * * *
-     * Required. The parent of this
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
      * 
* * @@ -805,8 +790,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
      * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -828,8 +812,7 @@ public java.lang.String getAttestorId() { * * *
-     * Required. The
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
      * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -851,8 +834,7 @@ public com.google.protobuf.ByteString getAttestorIdBytes() { * * *
-     * Required. The
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
      * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -873,8 +855,7 @@ public Builder setAttestorId(java.lang.String value) { * * *
-     * Required. The
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
      * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -891,8 +872,7 @@ public Builder clearAttestorId() { * * *
-     * Required. The
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
      * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -921,11 +901,9 @@ public Builder setAttestorIdBytes(com.google.protobuf.ByteString value) { * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -941,11 +919,9 @@ public boolean hasAttestor() { * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -967,11 +943,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -995,11 +969,9 @@ public Builder setAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -1021,11 +993,9 @@ public Builder setAttestor( * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -1053,11 +1023,9 @@ public Builder mergeAttestor(com.google.cloud.binaryauthorization.v1beta1.Attest * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -1079,11 +1047,9 @@ public Builder clearAttestor() { * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -1099,11 +1065,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder getAttestor * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * @@ -1123,11 +1087,9 @@ public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttesto * * *
-     * Required. The initial
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name, in the format `projects/*/attestors/*`.
+     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+     * in the format `projects/*/attestors/*`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java index c960539c..27d1e3af 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java @@ -27,8 +27,7 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The parent of this
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
    * 
* * @@ -42,8 +41,7 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The parent of this
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
+   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
    * 
* * @@ -58,8 +56,7 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
    * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -71,8 +68,7 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
+   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
    * 
* * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; @@ -85,11 +81,9 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * @@ -103,11 +97,9 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * @@ -121,11 +113,9 @@ public interface CreateAttestorRequestOrBuilder * * *
-   * Required. The initial
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name, in the format `projects/*/attestors/*`.
+   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
+   * in the format `projects/*/attestors/*`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java index c0cf7b2f..3b748ac3 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java @@ -117,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -144,9 +143,8 @@ public java.lang.String getName() { * * *
-   * Required. The name of the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -500,9 +498,8 @@ public Builder mergeFrom( * * *
-     * Required. The name of the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -526,9 +523,8 @@ public java.lang.String getName() { * * *
-     * Required. The name of the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -552,9 +548,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -577,9 +572,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -598,9 +592,8 @@ public Builder clearName() { * * *
-     * Required. The name of the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+     * `projects/*/attestors/*`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java index 0b498fed..a9d45ba3 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java @@ -27,9 +27,8 @@ public interface DeleteAttestorRequestOrBuilder * * *
-   * Required. The name of the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -43,9 +42,8 @@ public interface DeleteAttestorRequestOrBuilder * * *
-   * Required. The name of the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
+   * `projects/*/attestors/*`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java index 0d9475df..e6e28dc2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java @@ -117,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The name of the
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -144,9 +143,8 @@ public java.lang.String getName() { * * *
-   * Required. The name of the
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -496,9 +494,8 @@ public Builder mergeFrom( * * *
-     * Required. The name of the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -522,9 +519,8 @@ public java.lang.String getName() { * * *
-     * Required. The name of the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -548,9 +544,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The name of the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -573,9 +568,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The name of the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
      * 
* * @@ -594,9 +588,8 @@ public Builder clearName() { * * *
-     * Required. The name of the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-     * in the format `projects/*/attestors/*`.
+     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+     * `projects/*/attestors/*`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java index 30444044..62655936 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java @@ -27,9 +27,8 @@ public interface GetAttestorRequestOrBuilder * * *
-   * Required. The name of the
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+   * `projects/*/attestors/*`.
    * 
* * @@ -43,9 +42,8 @@ public interface GetAttestorRequestOrBuilder * * *
-   * Required. The name of the
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve,
-   * in the format `projects/*/attestors/*`.
+   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
+   * `projects/*/attestors/*`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java index ca6e6f00..60a9c334 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java @@ -117,9 +117,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of the
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-   * the format `projects/*/policy`.
+   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+   * in the format `projects/*/policy`.
    * 
* * @@ -144,9 +143,8 @@ public java.lang.String getName() { * * *
-   * Required. The resource name of the
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-   * the format `projects/*/policy`.
+   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+   * in the format `projects/*/policy`.
    * 
* * @@ -495,9 +493,8 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of the
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-     * the format `projects/*/policy`.
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
      * 
* * @@ -521,9 +518,8 @@ public java.lang.String getName() { * * *
-     * Required. The resource name of the
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-     * the format `projects/*/policy`.
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
      * 
* * @@ -547,9 +543,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The resource name of the
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-     * the format `projects/*/policy`.
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
      * 
* * @@ -572,9 +567,8 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The resource name of the
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-     * the format `projects/*/policy`.
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
      * 
* * @@ -593,9 +587,8 @@ public Builder clearName() { * * *
-     * Required. The resource name of the
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-     * the format `projects/*/policy`.
+     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+     * in the format `projects/*/policy`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java index 74f36848..1efb80fd 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java @@ -27,9 +27,8 @@ public interface GetPolicyRequestOrBuilder * * *
-   * Required. The resource name of the
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-   * the format `projects/*/policy`.
+   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+   * in the format `projects/*/policy`.
    * 
* * @@ -43,9 +42,8 @@ public interface GetPolicyRequestOrBuilder * * *
-   * Required. The resource name of the
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in
-   * the format `projects/*/policy`.
+   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
+   * in the format `projects/*/policy`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java new file mode 100644 index 00000000..fbc4c75c --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java @@ -0,0 +1,669 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/binaryauthorization/v1beta1/service.proto + +package com.google.cloud.binaryauthorization.v1beta1; + +/** + * + * + *
+ * Request to read the current system policy.
+ * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest} + */ +public final class GetSystemPolicyRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) + GetSystemPolicyRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetSystemPolicyRequest.newBuilder() to construct. + private GetSystemPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetSystemPolicyRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetSystemPolicyRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetSystemPolicyRequest( + 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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name, in the format `locations/*/policy`.
+   * Note that the system policy is not associated with a project.
+   * 
+ * + * + * 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, in the format `locations/*/policy`.
+   * Note that the system policy is not associated with a project.
+   * 
+ * + * + * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + 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.binaryauthorization.v1beta1.GetSystemPolicyRequest)) { + return super.equals(obj); + } + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest other = + (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) 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.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 read the current system policy.
+   * 
+ * + * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.Builder.class); + } + + // Construct using + // com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto + .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + getDefaultInstanceForType() { + return com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest build() { + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest buildPartial() { + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest result = + new com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest(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.binaryauthorization.v1beta1.GetSystemPolicyRequest) { + return mergeFrom( + (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest other) { + if (other + == com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + .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.binaryauthorization.v1beta1.GetSystemPolicyRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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, in the format `locations/*/policy`.
+     * Note that the system policy is not associated with a project.
+     * 
+ * + * + * 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.binaryauthorization.v1beta1.GetSystemPolicyRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) + private static final com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest(); + } + + public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetSystemPolicyRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetSystemPolicyRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java new file mode 100644 index 00000000..72b25d79 --- /dev/null +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/binaryauthorization/v1beta1/service.proto + +package com.google.cloud.binaryauthorization.v1beta1; + +public interface GetSystemPolicyRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name, in the format `locations/*/policy`.
+   * Note that the system policy is not associated with a project.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name, in the format `locations/*/policy`.
+   * Note that the system policy is not associated with a project.
+   * 
+ * + * + * 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-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java index 530d734c..cb82b587 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java @@ -131,8 +131,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-   * format `projects/*`.
+   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
    * 
* * @@ -158,8 +157,7 @@ public java.lang.String getParent() { * *
    * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-   * format `projects/*`.
+   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
    * 
* * @@ -207,9 +205,8 @@ public int getPageSize() { * *
    * A token identifying a page of results the server should return. Typically,
-   * this is the value of
-   * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-   * returned from the previous call to the `ListAttestors` method.
+   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+   * from the previous call to the `ListAttestors` method.
    * 
* * string page_token = 3; @@ -233,9 +230,8 @@ public java.lang.String getPageToken() { * *
    * A token identifying a page of results the server should return. Typically,
-   * this is the value of
-   * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-   * returned from the previous call to the `ListAttestors` method.
+   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+   * from the previous call to the `ListAttestors` method.
    * 
* * string page_token = 3; @@ -617,8 +613,7 @@ public Builder mergeFrom( * *
      * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-     * format `projects/*`.
+     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
      * 
* * @@ -643,8 +638,7 @@ public java.lang.String getParent() { * *
      * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-     * format `projects/*`.
+     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
      * 
* * @@ -669,8 +663,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-     * format `projects/*`.
+     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
      * 
* * @@ -694,8 +687,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-     * format `projects/*`.
+     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
      * 
* * @@ -715,8 +707,7 @@ public Builder clearParent() { * *
      * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-     * format `projects/*`.
+     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
      * 
* * @@ -798,9 +789,8 @@ public Builder clearPageSize() { * *
      * A token identifying a page of results the server should return. Typically,
-     * this is the value of
-     * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-     * returned from the previous call to the `ListAttestors` method.
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
      * 
* * string page_token = 3; @@ -823,9 +813,8 @@ public java.lang.String getPageToken() { * *
      * A token identifying a page of results the server should return. Typically,
-     * this is the value of
-     * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-     * returned from the previous call to the `ListAttestors` method.
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
      * 
* * string page_token = 3; @@ -848,9 +837,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * *
      * A token identifying a page of results the server should return. Typically,
-     * this is the value of
-     * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-     * returned from the previous call to the `ListAttestors` method.
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
      * 
* * string page_token = 3; @@ -872,9 +860,8 @@ public Builder setPageToken(java.lang.String value) { * *
      * A token identifying a page of results the server should return. Typically,
-     * this is the value of
-     * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-     * returned from the previous call to the `ListAttestors` method.
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
      * 
* * string page_token = 3; @@ -892,9 +879,8 @@ public Builder clearPageToken() { * *
      * A token identifying a page of results the server should return. Typically,
-     * this is the value of
-     * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-     * returned from the previous call to the `ListAttestors` method.
+     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+     * from the previous call to the `ListAttestors` method.
      * 
* * string page_token = 3; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java index bb2aeaa0..24f1dfb9 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java @@ -28,8 +28,7 @@ public interface ListAttestorsRequestOrBuilder * *
    * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-   * format `projects/*`.
+   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
    * 
* * @@ -44,8 +43,7 @@ public interface ListAttestorsRequestOrBuilder * *
    * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the
-   * format `projects/*`.
+   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
    * 
* * @@ -75,9 +73,8 @@ public interface ListAttestorsRequestOrBuilder * *
    * A token identifying a page of results the server should return. Typically,
-   * this is the value of
-   * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-   * returned from the previous call to the `ListAttestors` method.
+   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+   * from the previous call to the `ListAttestors` method.
    * 
* * string page_token = 3; @@ -90,9 +87,8 @@ public interface ListAttestorsRequestOrBuilder * *
    * A token identifying a page of results the server should return. Typically,
-   * this is the value of
-   * [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token]
-   * returned from the previous call to the `ListAttestors` method.
+   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
+   * from the previous call to the `ListAttestors` method.
    * 
* * string page_token = 3; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java index d6e56bd3..1e599720 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java @@ -207,9 +207,8 @@ public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttesto * *
    * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-   * field in the subsequent call to the `ListAttestors` method to retrieve the
-   * next page of results.
+   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+   * `ListAttestors` method to retrieve the next page of results.
    * 
* * string next_page_token = 2; @@ -233,9 +232,8 @@ public java.lang.String getNextPageToken() { * *
    * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-   * field in the subsequent call to the `ListAttestors` method to retrieve the
-   * next page of results.
+   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+   * `ListAttestors` method to retrieve the next page of results.
    * 
* * string next_page_token = 2; @@ -1006,9 +1004,8 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder addAttestor * *
      * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-     * field in the subsequent call to the `ListAttestors` method to retrieve the
-     * next page of results.
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
      * 
* * string next_page_token = 2; @@ -1031,9 +1028,8 @@ public java.lang.String getNextPageToken() { * *
      * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-     * field in the subsequent call to the `ListAttestors` method to retrieve the
-     * next page of results.
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
      * 
* * string next_page_token = 2; @@ -1056,9 +1052,8 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * *
      * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-     * field in the subsequent call to the `ListAttestors` method to retrieve the
-     * next page of results.
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
      * 
* * string next_page_token = 2; @@ -1080,9 +1075,8 @@ public Builder setNextPageToken(java.lang.String value) { * *
      * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-     * field in the subsequent call to the `ListAttestors` method to retrieve the
-     * next page of results.
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
      * 
* * string next_page_token = 2; @@ -1100,9 +1094,8 @@ public Builder clearNextPageToken() { * *
      * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-     * field in the subsequent call to the `ListAttestors` method to retrieve the
-     * next page of results.
+     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+     * `ListAttestors` method to retrieve the next page of results.
      * 
* * string next_page_token = 2; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java index 5c0b97d0..7f6a8a9b 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java @@ -80,9 +80,8 @@ public interface ListAttestorsResponseOrBuilder * *
    * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-   * field in the subsequent call to the `ListAttestors` method to retrieve the
-   * next page of results.
+   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+   * `ListAttestors` method to retrieve the next page of results.
    * 
* * string next_page_token = 2; @@ -95,9 +94,8 @@ public interface ListAttestorsResponseOrBuilder * *
    * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token]
-   * field in the subsequent call to the `ListAttestors` method to retrieve the
-   * next page of results.
+   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
+   * `ListAttestors` method to retrieve the next page of results.
    * 
* * string next_page_token = 2; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java index db4071b2..b9b86a57 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java @@ -146,7 +146,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; */ - SIGNATURE_ALGORITHM_UNSPECIFIED(0), + SIGNATURE_ALGORITHM_UNSPECIFIED(0, 0), /** * * @@ -156,7 +156,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_PSS_2048_SHA256 = 1; */ - RSA_PSS_2048_SHA256(1), + RSA_PSS_2048_SHA256(1, 1), /** * * @@ -166,7 +166,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_PSS_3072_SHA256 = 2; */ - RSA_PSS_3072_SHA256(2), + RSA_PSS_3072_SHA256(2, 2), /** * * @@ -176,7 +176,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_PSS_4096_SHA256 = 3; */ - RSA_PSS_4096_SHA256(3), + RSA_PSS_4096_SHA256(3, 3), /** * * @@ -186,7 +186,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_PSS_4096_SHA512 = 4; */ - RSA_PSS_4096_SHA512(4), + RSA_PSS_4096_SHA512(4, 4), /** * * @@ -196,7 +196,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_SIGN_PKCS1_2048_SHA256 = 5; */ - RSA_SIGN_PKCS1_2048_SHA256(5), + RSA_SIGN_PKCS1_2048_SHA256(5, 5), /** * * @@ -206,7 +206,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_SIGN_PKCS1_3072_SHA256 = 6; */ - RSA_SIGN_PKCS1_3072_SHA256(6), + RSA_SIGN_PKCS1_3072_SHA256(6, 6), /** * * @@ -216,7 +216,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_SIGN_PKCS1_4096_SHA256 = 7; */ - RSA_SIGN_PKCS1_4096_SHA256(7), + RSA_SIGN_PKCS1_4096_SHA256(7, 7), /** * * @@ -226,7 +226,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * RSA_SIGN_PKCS1_4096_SHA512 = 8; */ - RSA_SIGN_PKCS1_4096_SHA512(8), + RSA_SIGN_PKCS1_4096_SHA512(8, 8), /** * * @@ -236,7 +236,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * ECDSA_P256_SHA256 = 9; */ - ECDSA_P256_SHA256(9), + ECDSA_P256_SHA256(9, 9), /** * * @@ -246,7 +246,7 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * ECDSA_P384_SHA384 = 10; */ - ECDSA_P384_SHA384(10), + ECDSA_P384_SHA384(11, 10), /** * * @@ -256,10 +256,40 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * * ECDSA_P521_SHA512 = 11; */ - ECDSA_P521_SHA512(11), - UNRECOGNIZED(-1), + ECDSA_P521_SHA512(13, 11), + UNRECOGNIZED(-1, -1), ; + /** + * + * + *
+     * ECDSA on the NIST P-256 curve with a SHA256 digest.
+     * 
+ * + * EC_SIGN_P256_SHA256 = 9; + */ + public static final SignatureAlgorithm EC_SIGN_P256_SHA256 = ECDSA_P256_SHA256; + /** + * + * + *
+     * ECDSA on the NIST P-384 curve with a SHA384 digest.
+     * 
+ * + * EC_SIGN_P384_SHA384 = 10; + */ + public static final SignatureAlgorithm EC_SIGN_P384_SHA384 = ECDSA_P384_SHA384; + /** + * + * + *
+     * ECDSA on the NIST P-521 curve with a SHA512 digest.
+     * 
+ * + * EC_SIGN_P521_SHA512 = 11; + */ + public static final SignatureAlgorithm EC_SIGN_P521_SHA512 = ECDSA_P521_SHA512; /** * * @@ -360,6 +390,16 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * ECDSA_P256_SHA256 = 9; */ public static final int ECDSA_P256_SHA256_VALUE = 9; + /** + * + * + *
+     * ECDSA on the NIST P-256 curve with a SHA256 digest.
+     * 
+ * + * EC_SIGN_P256_SHA256 = 9; + */ + public static final int EC_SIGN_P256_SHA256_VALUE = 9; /** * * @@ -370,6 +410,16 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * ECDSA_P384_SHA384 = 10; */ public static final int ECDSA_P384_SHA384_VALUE = 10; + /** + * + * + *
+     * ECDSA on the NIST P-384 curve with a SHA384 digest.
+     * 
+ * + * EC_SIGN_P384_SHA384 = 10; + */ + public static final int EC_SIGN_P384_SHA384_VALUE = 10; /** * * @@ -380,9 +430,19 @@ public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnu * ECDSA_P521_SHA512 = 11; */ public static final int ECDSA_P521_SHA512_VALUE = 11; + /** + * + * + *
+     * ECDSA on the NIST P-521 curve with a SHA512 digest.
+     * 
+ * + * EC_SIGN_P521_SHA512 = 11; + */ + public static final int EC_SIGN_P521_SHA512_VALUE = 11; public final int getNumber() { - if (this == UNRECOGNIZED) { + if (index == -1) { throw new java.lang.IllegalArgumentException( "Can't get the number of an unknown enum value."); } @@ -448,11 +508,11 @@ public SignatureAlgorithm findValueByNumber(int number) { }; public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (this == UNRECOGNIZED) { + if (index == -1) { throw new java.lang.IllegalStateException( "Can't get the descriptor of an unrecognized enum value."); } - return getDescriptor().getValues().get(ordinal()); + return getDescriptor().getValues().get(index); } public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { @@ -465,7 +525,27 @@ public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor .get(0); } - private static final SignatureAlgorithm[] VALUES = values(); + private static final SignatureAlgorithm[] VALUES = getStaticValuesArray(); + + private static SignatureAlgorithm[] getStaticValuesArray() { + return new SignatureAlgorithm[] { + SIGNATURE_ALGORITHM_UNSPECIFIED, + RSA_PSS_2048_SHA256, + RSA_PSS_3072_SHA256, + RSA_PSS_4096_SHA256, + RSA_PSS_4096_SHA512, + RSA_SIGN_PKCS1_2048_SHA256, + RSA_SIGN_PKCS1_3072_SHA256, + RSA_SIGN_PKCS1_4096_SHA256, + RSA_SIGN_PKCS1_4096_SHA512, + ECDSA_P256_SHA256, + EC_SIGN_P256_SHA256, + ECDSA_P384_SHA384, + EC_SIGN_P384_SHA384, + ECDSA_P521_SHA512, + EC_SIGN_P521_SHA512, + }; + } public static SignatureAlgorithm valueOf( com.google.protobuf.Descriptors.EnumValueDescriptor desc) { @@ -478,9 +558,11 @@ public static SignatureAlgorithm valueOf( return VALUES[desc.getIndex()]; } + private final int index; private final int value; - private SignatureAlgorithm(int value) { + private SignatureAlgorithm(int index, int value) { + this.index = index; this.value = value; } diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java index e040371d..8db61519 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java @@ -22,8 +22,7 @@ * * *
- * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for container
- * image binary authorization.
+ * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization.
  * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Policy} @@ -162,6 +161,72 @@ private Policy( globalPolicyEvaluationMode_ = rawValue; break; } + case 66: + { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + kubernetesServiceAccountAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000008; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + input.readMessage( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + kubernetesServiceAccountAdmissionRules_ + .getMutableMap() + .put( + kubernetesServiceAccountAdmissionRules__.getKey(), + kubernetesServiceAccountAdmissionRules__.getValue()); + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { + istioServiceIdentityAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000010; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + istioServiceIdentityAdmissionRules__ = + input.readMessage( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + istioServiceIdentityAdmissionRules_ + .getMutableMap() + .put( + istioServiceIdentityAdmissionRules__.getKey(), + istioServiceIdentityAdmissionRules__.getValue()); + break; + } + case 82: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + kubernetesNamespaceAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000004; + } + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + input.readMessage( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + kubernetesNamespaceAdmissionRules_ + .getMutableMap() + .put( + kubernetesNamespaceAdmissionRules__.getKey(), + kubernetesNamespaceAdmissionRules__.getValue()); + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -196,6 +261,12 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 3: return internalGetClusterAdmissionRules(); + case 10: + return internalGetKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetIstioServiceIdentityAdmissionRules(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -762,161 +833,575 @@ public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmi return map.get(key); } - public static final int DEFAULT_ADMISSION_RULE_FIELD_NUMBER = 4; - private com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultAdmissionRule_; + public static final int KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER = 10; + + private static final class KubernetesNamespaceAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.binaryauthorization.v1beta1 + .BinaryAuthorizationResourcesProto + .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + .getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesNamespaceAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetKubernetesNamespaceAdmissionRules() { + if (kubernetesNamespaceAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesNamespaceAdmissionRules_; + } + + public int getKubernetesNamespaceAdmissionRulesCount() { + return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); + } /** * * *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
    * 
* * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the defaultAdmissionRule field is set. */ @java.lang.Override - public boolean hasDefaultAdmissionRule() { - return defaultAdmissionRule_ != null; + public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getKubernetesNamespaceAdmissionRules() { + return getKubernetesNamespaceAdmissionRulesMap(); } /** * * *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
    * 
* * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * + */ + @java.lang.Override + public java.util.Map + getKubernetesNamespaceAdmissionRulesMap() { + return internalGetKubernetesNamespaceAdmissionRules().getMap(); + } + /** * - * @return The defaultAdmissionRule. + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultAdmissionRule() { - return defaultAdmissionRule_ == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance() - : defaultAdmissionRule_; + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
    * 
* * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder() { - return getDefaultAdmissionRule(); + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); } - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; + public static final int KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER = 8; + + private static final class KubernetesServiceAccountAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.binaryauthorization.v1beta1 + .BinaryAuthorizationResourcesProto + .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + .getDefaultInstance()); + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesServiceAccountAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetKubernetesServiceAccountAdmissionRules() { + if (kubernetesServiceAccountAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesServiceAccountAdmissionRules_; + } + + public int getKubernetesServiceAccountAdmissionRulesCount() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); + } /** * * *
-   * Output only. Time when the policy was last updated.
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
    * 
* - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return Whether the updateTime field is set. */ @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; + public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getKubernetesServiceAccountAdmissionRules() { + return getKubernetesServiceAccountAdmissionRulesMap(); } /** * * *
-   * Output only. Time when the policy was last updated.
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
    * 
* - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * + */ + @java.lang.Override + public java.util.Map + getKubernetesServiceAccountAdmissionRulesMap() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap(); + } + /** * - * @return The updateTime. + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * */ @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-   * Output only. Time when the policy was last updated.
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
    * 
* - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - return getUpdateTime(); + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetKubernetesServiceAccountAdmissionRules().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; + public static final int ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER = 9; - memoizedIsInitialized = 1; - return true; + private static final class IstioServiceIdentityAdmissionRulesDefaultEntryHolder { + static final com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + defaultEntry = + com.google.protobuf.MapEntry + . + newDefaultInstance( + com.google.cloud.binaryauthorization.v1beta1 + .BinaryAuthorizationResourcesProto + .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.MESSAGE, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + .getDefaultInstance()); } - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { - output.writeMessage(2, admissionWhitelistPatterns_.get(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetClusterAdmissionRules(), - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry, - 3); - if (defaultAdmissionRule_ != null) { - output.writeMessage(4, getDefaultAdmissionRule()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - if (globalPolicyEvaluationMode_ - != com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(7, globalPolicyEvaluationMode_); + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + istioServiceIdentityAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetIstioServiceIdentityAdmissionRules() { + if (istioServiceIdentityAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); } - unknownFields.writeTo(output); + return istioServiceIdentityAdmissionRules_; } - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - + public int getIstioServiceIdentityAdmissionRulesCount() { + return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); + } + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map + getIstioServiceIdentityAdmissionRules() { + return getIstioServiceIdentityAdmissionRulesMap(); + } + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.Map + getIstioServiceIdentityAdmissionRulesMap() { + return internalGetIstioServiceIdentityAdmissionRules().getMap(); + } + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public static final int DEFAULT_ADMISSION_RULE_FIELD_NUMBER = 4; + private com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultAdmissionRule_; + /** + * + * + *
+   * Required. Default admission rule for a cluster without a per-cluster, per-
+   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the defaultAdmissionRule field is set. + */ + @java.lang.Override + public boolean hasDefaultAdmissionRule() { + return defaultAdmissionRule_ != null; + } + /** + * + * + *
+   * Required. Default admission rule for a cluster without a per-cluster, per-
+   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The defaultAdmissionRule. + */ + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultAdmissionRule() { + return defaultAdmissionRule_ == null + ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance() + : defaultAdmissionRule_; + } + /** + * + * + *
+   * Required. Default admission rule for a cluster without a per-cluster, per-
+   * kubernetes-service-account, or per-istio-service-identity admission rule.
+   * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder + getDefaultAdmissionRuleOrBuilder() { + return getDefaultAdmissionRule(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Time when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Time when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Time when the policy was last updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 5 [(.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { + output.writeMessage(2, admissionWhitelistPatterns_.get(i)); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetClusterAdmissionRules(), + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry, + 3); + if (defaultAdmissionRule_ != null) { + output.writeMessage(4, getDefaultAdmissionRule()); + } + if (updateTime_ != null) { + output.writeMessage(5, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); + } + if (globalPolicyEvaluationMode_ + != com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode + .GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED + .getNumber()) { + output.writeEnum(7, globalPolicyEvaluationMode_); + } + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetKubernetesServiceAccountAdmissionRules(), + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry, + 8); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetIstioServiceIdentityAdmissionRules(), + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry, + 9); + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, + internalGetKubernetesNamespaceAdmissionRules(), + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, + 10); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); @@ -955,21 +1440,66 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, globalPolicyEvaluationMode_); } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.Policy)) { - return super.equals(obj); + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + entry : internalGetKubernetesServiceAccountAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, kubernetesServiceAccountAdmissionRules__); } - com.google.cloud.binaryauthorization.v1beta1.Policy other = - (com.google.cloud.binaryauthorization.v1beta1.Policy) obj; + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + entry : internalGetIstioServiceIdentityAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + istioServiceIdentityAdmissionRules__ = + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, istioServiceIdentityAdmissionRules__); + } + for (java.util.Map.Entry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + entry : internalGetKubernetesNamespaceAdmissionRules().getMap().entrySet()) { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 10, kubernetesNamespaceAdmissionRules__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.Policy)) { + return super.equals(obj); + } + com.google.cloud.binaryauthorization.v1beta1.Policy other = + (com.google.cloud.binaryauthorization.v1beta1.Policy) obj; if (!getName().equals(other.getName())) return false; if (!getDescription().equals(other.getDescription())) return false; @@ -978,6 +1508,12 @@ public boolean equals(final java.lang.Object obj) { return false; if (!internalGetClusterAdmissionRules().equals(other.internalGetClusterAdmissionRules())) return false; + if (!internalGetKubernetesNamespaceAdmissionRules() + .equals(other.internalGetKubernetesNamespaceAdmissionRules())) return false; + if (!internalGetKubernetesServiceAccountAdmissionRules() + .equals(other.internalGetKubernetesServiceAccountAdmissionRules())) return false; + if (!internalGetIstioServiceIdentityAdmissionRules() + .equals(other.internalGetIstioServiceIdentityAdmissionRules())) return false; if (hasDefaultAdmissionRule() != other.hasDefaultAdmissionRule()) return false; if (hasDefaultAdmissionRule()) { if (!getDefaultAdmissionRule().equals(other.getDefaultAdmissionRule())) return false; @@ -1011,6 +1547,18 @@ public int hashCode() { hash = (37 * hash) + CLUSTER_ADMISSION_RULES_FIELD_NUMBER; hash = (53 * hash) + internalGetClusterAdmissionRules().hashCode(); } + if (!internalGetKubernetesNamespaceAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetKubernetesNamespaceAdmissionRules().hashCode(); + } + if (!internalGetKubernetesServiceAccountAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetKubernetesServiceAccountAdmissionRules().hashCode(); + } + if (!internalGetIstioServiceIdentityAdmissionRules().getMap().isEmpty()) { + hash = (37 * hash) + ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER; + hash = (53 * hash) + internalGetIstioServiceIdentityAdmissionRules().hashCode(); + } if (hasDefaultAdmissionRule()) { hash = (37 * hash) + DEFAULT_ADMISSION_RULE_FIELD_NUMBER; hash = (53 * hash) + getDefaultAdmissionRule().hashCode(); @@ -1123,8 +1671,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for container
-   * image binary authorization.
+   * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization.
    * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Policy} @@ -1143,6 +1690,12 @@ protected com.google.protobuf.MapField internalGetMapField(int number) { switch (number) { case 3: return internalGetClusterAdmissionRules(); + case 10: + return internalGetKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetIstioServiceIdentityAdmissionRules(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1153,6 +1706,12 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { switch (number) { case 3: return internalGetMutableClusterAdmissionRules(); + case 10: + return internalGetMutableKubernetesNamespaceAdmissionRules(); + case 8: + return internalGetMutableKubernetesServiceAccountAdmissionRules(); + case 9: + return internalGetMutableIstioServiceIdentityAdmissionRules(); default: throw new RuntimeException("Invalid map field number: " + number); } @@ -1200,6 +1759,9 @@ public Builder clear() { admissionWhitelistPatternsBuilder_.clear(); } internalGetMutableClusterAdmissionRules().clear(); + internalGetMutableKubernetesNamespaceAdmissionRules().clear(); + internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); + internalGetMutableIstioServiceIdentityAdmissionRules().clear(); if (defaultAdmissionRuleBuilder_ == null) { defaultAdmissionRule_ = null; } else { @@ -1255,6 +1817,13 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy buildPartial() { } result.clusterAdmissionRules_ = internalGetClusterAdmissionRules(); result.clusterAdmissionRules_.makeImmutable(); + result.kubernetesNamespaceAdmissionRules_ = internalGetKubernetesNamespaceAdmissionRules(); + result.kubernetesNamespaceAdmissionRules_.makeImmutable(); + result.kubernetesServiceAccountAdmissionRules_ = + internalGetKubernetesServiceAccountAdmissionRules(); + result.kubernetesServiceAccountAdmissionRules_.makeImmutable(); + result.istioServiceIdentityAdmissionRules_ = internalGetIstioServiceIdentityAdmissionRules(); + result.istioServiceIdentityAdmissionRules_.makeImmutable(); if (defaultAdmissionRuleBuilder_ == null) { result.defaultAdmissionRule_ = defaultAdmissionRule_; } else { @@ -1354,6 +1923,12 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.Policy oth } } internalGetMutableClusterAdmissionRules().mergeFrom(other.internalGetClusterAdmissionRules()); + internalGetMutableKubernetesNamespaceAdmissionRules() + .mergeFrom(other.internalGetKubernetesNamespaceAdmissionRules()); + internalGetMutableKubernetesServiceAccountAdmissionRules() + .mergeFrom(other.internalGetKubernetesServiceAccountAdmissionRules()); + internalGetMutableIstioServiceIdentityAdmissionRules() + .mergeFrom(other.internalGetIstioServiceIdentityAdmissionRules()); if (other.hasDefaultAdmissionRule()) { mergeDefaultAdmissionRule(other.getDefaultAdmissionRule()); } @@ -1389,1001 +1964,1624 @@ public Builder mergeFrom( } return this; } - - private int bitField0_; - - private java.lang.Object name_ = ""; + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The resource name, in the format `projects/*/policy`. There is
+     * at most one policy per project.
+     * 
+ * + * 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 description_ = ""; + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The description. + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for description. + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The description to set. + * @return This builder for chaining. + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A descriptive comment.
+     * 
+ * + * string description = 6 [(.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 int globalPolicyEvaluationMode_ = 0; + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for globalPolicyEvaluationMode. + */ + @java.lang.Override + public int getGlobalPolicyEvaluationModeValue() { + return globalPolicyEvaluationMode_; + } + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for globalPolicyEvaluationMode to set. + * @return This builder for chaining. + */ + public Builder setGlobalPolicyEvaluationModeValue(int value) { + + globalPolicyEvaluationMode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The globalPolicyEvaluationMode. + */ + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode + getGlobalPolicyEvaluationMode() { + @SuppressWarnings("deprecation") + com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode result = + com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode.valueOf( + globalPolicyEvaluationMode_); + return result == null + ? com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode + .UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The globalPolicyEvaluationMode to set. + * @return This builder for chaining. + */ + public Builder setGlobalPolicyEvaluationMode( + com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode value) { + if (value == null) { + throw new NullPointerException(); + } + + globalPolicyEvaluationMode_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Controls the evaluation of a Google-maintained global admission
+     * policy for common system-level images. Images not covered by the global
+     * policy will be subject to the project admission policy. This setting
+     * has no effect when specified inside a global admission policy.
+     * 
+ * + * + * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearGlobalPolicyEvaluationMode() { + + globalPolicyEvaluationMode_ = 0; + onChanged(); + return this; + } + + private java.util.List + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + + private void ensureAdmissionWhitelistPatternsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + admissionWhitelistPatterns_ = + new java.util.ArrayList< + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern>( + admissionWhitelistPatterns_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> + admissionWhitelistPatternsBuilder_; + + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getAdmissionWhitelistPatternsList() { + if (admissionWhitelistPatternsBuilder_ == null) { + return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + } else { + return admissionWhitelistPatternsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getAdmissionWhitelistPatternsCount() { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.size(); + } else { + return admissionWhitelistPatternsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + getAdmissionWhitelistPatterns(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.get(index); + } else { + return admissionWhitelistPatternsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdmissionWhitelistPatterns( + int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.set(index, value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setAdmissionWhitelistPatterns( + int index, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.set(index, builderForValue.build()); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAdmissionWhitelistPatterns( + int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { + if (admissionWhitelistPatternsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(index, value); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addMessage(index, value); + } + return this; + } /** * * *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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; + public Builder addAdmissionWhitelistPatterns( + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(builderForValue.build()); + onChanged(); } else { - return (java.lang.String) ref; + admissionWhitelistPatternsBuilder_.addMessage(builderForValue.build()); } + return this; } /** * * *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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; + public Builder addAdmissionWhitelistPatterns( + int index, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + builderForValue) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(index, builderForValue.build()); + onChanged(); } else { - return (com.google.protobuf.ByteString) ref; + admissionWhitelistPatternsBuilder_.addMessage(index, builderForValue.build()); } + return this; } /** * * *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); + public Builder addAllAdmissionWhitelistPatterns( + java.lang.Iterable< + ? extends com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern> + values) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, admissionWhitelistPatterns_); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.addAllMessages(values); } - - name_ = value; - onChanged(); return this; } /** * * *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); + public Builder clearAdmissionWhitelistPatterns() { + if (admissionWhitelistPatternsBuilder_ == null) { + admissionWhitelistPatterns_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.clear(); + } return this; } /** * * *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The bytes for name to set. - * @return This builder for chaining. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setNameBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public Builder removeAdmissionWhitelistPatterns(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.remove(index); + onChanged(); + } else { + admissionWhitelistPatternsBuilder_.remove(index); } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); return this; } - - private java.lang.Object description_ = ""; /** * * *
-     * Optional. A descriptive comment.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + getAdmissionWhitelistPatternsBuilder(int index) { + return getAdmissionWhitelistPatternsFieldBuilder().getBuilder(index); + } + /** * - * @return The description. + * + *
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
+     * 
+ * + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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; + public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder + getAdmissionWhitelistPatternsOrBuilder(int index) { + if (admissionWhitelistPatternsBuilder_ == null) { + return admissionWhitelistPatterns_.get(index); } else { - return (java.lang.String) ref; + return admissionWhitelistPatternsBuilder_.getMessageOrBuilder(index); } } /** * * *
-     * Optional. A descriptive comment.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - 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; + public java.util.List< + ? extends + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsOrBuilderList() { + if (admissionWhitelistPatternsBuilder_ != null) { + return admissionWhitelistPatternsBuilder_.getMessageOrBuilderList(); } else { - return (com.google.protobuf.ByteString) ref; + return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); } } /** * * *
-     * Optional. A descriptive comment.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; + public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + addAdmissionWhitelistPatternsBuilder() { + return getAdmissionWhitelistPatternsFieldBuilder() + .addBuilder( + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + .getDefaultInstance()); } /** * * *
-     * Optional. A descriptive comment.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder + addAdmissionWhitelistPatternsBuilder(int index) { + return getAdmissionWhitelistPatternsFieldBuilder() + .addBuilder( + index, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + .getDefaultInstance()); } /** * * *
-     * Optional. A descriptive comment.
+     * Optional. Admission policy allowlisting. A matching admission request will
+     * always be permitted. This feature is typically used to exclude Google or
+     * third-party infrastructure images from Binary Authorization policies.
      * 
* - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. + * + * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); + public java.util.List< + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder> + getAdmissionWhitelistPatternsBuilderList() { + return getAdmissionWhitelistPatternsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> + getAdmissionWhitelistPatternsFieldBuilder() { + if (admissionWhitelistPatternsBuilder_ == null) { + admissionWhitelistPatternsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder>( + admissionWhitelistPatterns_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + admissionWhitelistPatterns_ = null; } - checkByteStringIsUtf8(value); + return admissionWhitelistPatternsBuilder_; + } - description_ = value; + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + clusterAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetClusterAdmissionRules() { + if (clusterAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return clusterAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetMutableClusterAdmissionRules() { onChanged(); - return this; + ; + if (clusterAdmissionRules_ == null) { + clusterAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!clusterAdmissionRules_.isMutable()) { + clusterAdmissionRules_ = clusterAdmissionRules_.copy(); + } + return clusterAdmissionRules_; } - private int globalPolicyEvaluationMode_ = 0; + public int getClusterAdmissionRulesCount() { + return internalGetClusterAdmissionRules().getMap().size(); + } /** * * *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. */ @java.lang.Override - public int getGlobalPolicyEvaluationModeValue() { - return globalPolicyEvaluationMode_; + public boolean containsClusterAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetClusterAdmissionRules().getMap().containsKey(key); } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for globalPolicyEvaluationMode to set. - * @return This builder for chaining. - */ - public Builder setGlobalPolicyEvaluationModeValue(int value) { - - globalPolicyEvaluationMode_ = value; - onChanged(); - return this; + /** Use {@link #getClusterAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getClusterAdmissionRules() { + return getClusterAdmissionRulesMap(); } /** * * *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return The globalPolicyEvaluationMode. */ @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode result = - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode.valueOf( - globalPolicyEvaluationMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .UNRECOGNIZED - : result; + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getClusterAdmissionRulesMap() { + return internalGetClusterAdmissionRules().getMap(); } /** * * *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @param value The globalPolicyEvaluationMode to set. - * @return This builder for chaining. */ - public Builder setGlobalPolicyEvaluationMode( - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode value) { - if (value == null) { - throw new NullPointerException(); + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getClusterAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); } - - globalPolicyEvaluationMode_ = value.getNumber(); - onChanged(); - return this; + java.util.Map + map = internalGetClusterAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * - * - * @return This builder for chaining. */ - public Builder clearGlobalPolicyEvaluationMode() { - - globalPolicyEvaluationMode_ = 0; - onChanged(); - return this; - } - - private java.util.List - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - - private void ensureAdmissionWhitelistPatternsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern>( - admissionWhitelistPatterns_); - bitField0_ |= 0x00000001; + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getClusterAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetClusterAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - admissionWhitelistPatternsBuilder_; - + public Builder clearClusterAdmissionRules() { + internalGetMutableClusterAdmissionRules().getMutableMap().clear(); + return this; + } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List - getAdmissionWhitelistPatternsList() { - if (admissionWhitelistPatternsBuilder_ == null) { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } else { - return admissionWhitelistPatternsBuilder_.getMessageList(); + public Builder removeClusterAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } + internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getMutableClusterAdmissionRules() { + return internalGetMutableClusterAdmissionRules().getMutableMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public int getAdmissionWhitelistPatternsCount() { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.size(); - } else { - return admissionWhitelistPatternsBuilder_.getCount(); + public Builder putClusterAdmissionRules( + java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); + return this; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-cluster admission rules. Cluster spec format:
+     * `location.clusterId`. There can be at most one admission rule per cluster
+     * spec.
+     * A `location` is either a compute zone (e.g. us-central1-a) or a region
+     * (e.g. us-central1).
+     * For `clusterId` syntax restrictions see
+     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessage(index); + public Builder putAllClusterAdmissionRules( + java.util.Map + values) { + internalGetMutableClusterAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesNamespaceAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetKubernetesNamespaceAdmissionRules() { + if (kubernetesNamespaceAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); } + return kubernetesNamespaceAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetMutableKubernetesNamespaceAdmissionRules() { + onChanged(); + ; + if (kubernetesNamespaceAdmissionRules_ == null) { + kubernetesNamespaceAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!kubernetesNamespaceAdmissionRules_.isMutable()) { + kubernetesNamespaceAdmissionRules_ = kubernetesNamespaceAdmissionRules_.copy(); + } + return kubernetesNamespaceAdmissionRules_; + } + + public int getKubernetesNamespaceAdmissionRulesCount() { + return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAdmissionWhitelistPatterns( - int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, value); + @java.lang.Override + public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } - return this; + return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getKubernetesNamespaceAdmissionRules() { + return getKubernetesNamespaceAdmissionRulesMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder setAdmissionWhitelistPatterns( - int index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, builderForValue.build()); - } - return this; + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getKubernetesNamespaceAdmissionRulesMap() { + return internalGetKubernetesNamespaceAdmissionRules().getMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAdmissionWhitelistPatterns( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(value); + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); } - return this; + java.util.Map + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAdmissionWhitelistPatterns( - int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, value); + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map + map = internalGetKubernetesNamespaceAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); } + return map.get(key); + } + + public Builder clearKubernetesNamespaceAdmissionRules() { + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().clear(); return this; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAdmissionWhitelistPatterns( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(builderForValue.build()); + public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); return this; } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getMutableKubernetesNamespaceAdmissionRules() { + return internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap(); + } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAdmissionWhitelistPatterns( - int index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, builderForValue.build()); + public Builder putKubernetesNamespaceAdmissionRules( + java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); return this; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+     *   `[a-z.-]+`, e.g. `some-namespace`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder addAllAdmissionWhitelistPatterns( - java.lang.Iterable< - ? extends com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern> + public Builder putAllKubernetesNamespaceAdmissionRules( + java.util.Map values) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, admissionWhitelistPatterns_); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addAllMessages(values); + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().putAll(values); + return this; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesServiceAccountAdmissionRules_; + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetKubernetesServiceAccountAdmissionRules() { + if (kubernetesServiceAccountAdmissionRules_ == null) { + return com.google.protobuf.MapField.emptyMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + return kubernetesServiceAccountAdmissionRules_; + } + + private com.google.protobuf.MapField< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + internalGetMutableKubernetesServiceAccountAdmissionRules() { + onChanged(); + ; + if (kubernetesServiceAccountAdmissionRules_ == null) { + kubernetesServiceAccountAdmissionRules_ = + com.google.protobuf.MapField.newMapField( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); + } + if (!kubernetesServiceAccountAdmissionRules_.isMutable()) { + kubernetesServiceAccountAdmissionRules_ = kubernetesServiceAccountAdmissionRules_.copy(); } - return this; + return kubernetesServiceAccountAdmissionRules_; } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAdmissionWhitelistPatterns() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.clear(); - } - return this; + + public int getKubernetesServiceAccountAdmissionRulesCount() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.remove(index); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.remove(index); + @java.lang.Override + public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } - return this; + return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); + } + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getKubernetesServiceAccountAdmissionRules() { + return getKubernetesServiceAccountAdmissionRulesMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - getAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilder(index); + @java.lang.Override + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getKubernetesServiceAccountAdmissionRulesMap() { + return internalGetKubernetesServiceAccountAdmissionRules().getMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilder(index); + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); } + java.util.Map + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List< - ? extends - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList() { - if (admissionWhitelistPatternsBuilder_ != null) { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); + @java.lang.Override + public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); } + java.util.Map + map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearKubernetesServiceAccountAdmissionRules() { + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().clear(); + return this; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder() { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance()); + public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map< + java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + getMutableKubernetesServiceAccountAdmissionRules() { + return internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap(); } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance()); + public Builder putKubernetesServiceAccountAdmissionRules( + java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + if (value == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); + return this; } /** * * *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
+     * Optional. Per-kubernetes-service-account admission rules. Service account
+     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
      * 
* * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ - public java.util.List< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder> - getAdmissionWhitelistPatternsBuilderList() { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsFieldBuilder() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatternsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder>( - admissionWhitelistPatterns_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - admissionWhitelistPatterns_ = null; - } - return admissionWhitelistPatternsBuilder_; + public Builder putAllKubernetesServiceAccountAdmissionRules( + java.util.Map + values) { + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().putAll(values); + return this; } private com.google.protobuf.MapField< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules_; + istioServiceIdentityAdmissionRules_; private com.google.protobuf.MapField< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetClusterAdmissionRules() { - if (clusterAdmissionRules_ == null) { + internalGetIstioServiceIdentityAdmissionRules() { + if (istioServiceIdentityAdmissionRules_ == null) { return com.google.protobuf.MapField.emptyMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); } - return clusterAdmissionRules_; + return istioServiceIdentityAdmissionRules_; } private com.google.protobuf.MapField< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetMutableClusterAdmissionRules() { + internalGetMutableIstioServiceIdentityAdmissionRules() { onChanged(); ; - if (clusterAdmissionRules_ == null) { - clusterAdmissionRules_ = + if (istioServiceIdentityAdmissionRules_ == null) { + istioServiceIdentityAdmissionRules_ = com.google.protobuf.MapField.newMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); } - if (!clusterAdmissionRules_.isMutable()) { - clusterAdmissionRules_ = clusterAdmissionRules_.copy(); + if (!istioServiceIdentityAdmissionRules_.isMutable()) { + istioServiceIdentityAdmissionRules_ = istioServiceIdentityAdmissionRules_.copy(); } - return clusterAdmissionRules_; + return istioServiceIdentityAdmissionRules_; } - public int getClusterAdmissionRulesCount() { - return internalGetClusterAdmissionRules().getMap().size(); + public int getIstioServiceIdentityAdmissionRulesCount() { + return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override - public boolean containsClusterAdmissionRules(java.lang.String key) { + public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } - return internalGetClusterAdmissionRules().getMap().containsKey(key); + return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); } - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getClusterAdmissionRules() { - return getClusterAdmissionRulesMap(); + getIstioServiceIdentityAdmissionRules() { + return getIstioServiceIdentityAdmissionRulesMap(); } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public java.util.Map< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getClusterAdmissionRulesMap() { - return internalGetClusterAdmissionRules().getMap(); + getIstioServiceIdentityAdmissionRulesMap() { + return internalGetIstioServiceIdentityAdmissionRules().getMap(); } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getClusterAdmissionRulesOrDefault( + getIstioServiceIdentityAdmissionRulesOrDefault( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map - map = internalGetClusterAdmissionRules().getMap(); + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ @java.lang.Override public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getClusterAdmissionRulesOrThrow(java.lang.String key) { + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } java.util.Map - map = internalGetClusterAdmissionRules().getMap(); + map = internalGetIstioServiceIdentityAdmissionRules().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } - public Builder clearClusterAdmissionRules() { - internalGetMutableClusterAdmissionRules().getMutableMap().clear(); + public Builder clearIstioServiceIdentityAdmissionRules() { + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().clear(); return this; } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder removeClusterAdmissionRules(java.lang.String key) { + public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { throw new java.lang.NullPointerException(); } - internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); return this; } /** Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map< java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getMutableClusterAdmissionRules() { - return internalGetMutableClusterAdmissionRules().getMutableMap(); + getMutableIstioServiceIdentityAdmissionRules() { + return internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap(); } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder putClusterAdmissionRules( + public Builder putIstioServiceIdentityAdmissionRules( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { if (key == null) { throw new java.lang.NullPointerException(); @@ -2391,30 +3589,28 @@ public Builder putClusterAdmissionRules( if (value == null) { throw new java.lang.NullPointerException(); } - internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); return this; } /** * * *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
+     * Optional. Per-istio-service-identity admission rules. Istio service
+     * identity spec format:
+     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
      * 
* * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ - public Builder putAllClusterAdmissionRules( + public Builder putAllIstioServiceIdentityAdmissionRules( java.util.Map values) { - internalGetMutableClusterAdmissionRules().getMutableMap().putAll(values); + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().putAll(values); return this; } diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java index 80c0bb2a..68594ab0 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java @@ -16,7 +16,9 @@ package com.google.cloud.binaryauthorization.v1beta1; +import com.google.api.core.BetaApi; import com.google.api.pathtemplate.PathTemplate; +import com.google.api.pathtemplate.ValidationException; import com.google.api.resourcenames.ResourceName; import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; @@ -31,26 +33,54 @@ public class PolicyName implements ResourceName { private static final PathTemplate PROJECT = PathTemplate.createWithoutUrlEncoding("projects/{project}/policy"); + private static final PathTemplate LOCATION = + PathTemplate.createWithoutUrlEncoding("locations/{location}/policy"); private volatile Map fieldValuesMap; + private PathTemplate pathTemplate; + private String fixedValue; private final String project; + private final String location; @Deprecated protected PolicyName() { project = null; + location = null; } private PolicyName(Builder builder) { project = Preconditions.checkNotNull(builder.getProject()); + location = null; + pathTemplate = PROJECT; + } + + private PolicyName(LocationBuilder builder) { + location = Preconditions.checkNotNull(builder.getLocation()); + project = null; + pathTemplate = LOCATION; } public String getProject() { return project; } + public String getLocation() { + return location; + } + public static Builder newBuilder() { return new Builder(); } + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static Builder newProjectBuilder() { + return new Builder(); + } + + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static LocationBuilder newLocationBuilder() { + return new LocationBuilder(); + } + public Builder toBuilder() { return new Builder(this); } @@ -59,18 +89,42 @@ public static PolicyName of(String project) { return newBuilder().setProject(project).build(); } + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static PolicyName ofProjectName(String project) { + return newBuilder().setProject(project).build(); + } + + @BetaApi("The static create methods are not stable yet and may be changed in the future.") + public static PolicyName ofLocationName(String location) { + return newLocationBuilder().setLocation(location).build(); + } + public static String format(String project) { return newBuilder().setProject(project).build().toString(); } + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatProjectName(String project) { + return newBuilder().setProject(project).build().toString(); + } + + @BetaApi("The static format methods are not stable yet and may be changed in the future.") + public static String formatLocationName(String location) { + return newLocationBuilder().setLocation(location).build().toString(); + } + public static PolicyName parse(String formattedString) { if (formattedString.isEmpty()) { return null; } - Map matchMap = - PROJECT.validatedMatch( - formattedString, "PolicyName.parse: formattedString not in valid format"); - return of(matchMap.get("project")); + if (PROJECT.matches(formattedString)) { + Map matchMap = PROJECT.match(formattedString); + return ofProjectName(matchMap.get("project")); + } else if (LOCATION.matches(formattedString)) { + Map matchMap = LOCATION.match(formattedString); + return ofLocationName(matchMap.get("location")); + } + throw new ValidationException("PolicyName.parse: formattedString not in valid format"); } public static List parseList(List formattedStrings) { @@ -94,7 +148,7 @@ public static List toStringList(List values) { } public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString); + return PROJECT.matches(formattedString) || LOCATION.matches(formattedString); } @Override @@ -106,6 +160,9 @@ public Map getFieldValuesMap() { if (project != null) { fieldMapBuilder.put("project", project); } + if (location != null) { + fieldMapBuilder.put("location", location); + } fieldValuesMap = fieldMapBuilder.build(); } } @@ -119,7 +176,7 @@ public String getFieldValue(String fieldName) { @Override public String toString() { - return PROJECT.instantiate("project", project); + return fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); } @Override @@ -129,7 +186,8 @@ public boolean equals(Object o) { } if (o != null || getClass() == o.getClass()) { PolicyName that = ((PolicyName) o); - return Objects.equals(this.project, that.project); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location); } return false; } @@ -138,7 +196,11 @@ public boolean equals(Object o) { public int hashCode() { int h = 1; h *= 1000003; + h ^= Objects.hashCode(fixedValue); + h *= 1000003; h ^= Objects.hashCode(project); + h *= 1000003; + h ^= Objects.hashCode(location); return h; } @@ -158,6 +220,9 @@ public Builder setProject(String project) { } private Builder(PolicyName policyName) { + Preconditions.checkArgument( + Objects.equals(policyName.pathTemplate, PROJECT), + "toBuilder is only supported when PolicyName has the pattern of projects/{project}/policy"); this.project = policyName.project; } @@ -165,4 +230,25 @@ public PolicyName build() { return new PolicyName(this); } } + + /** Builder for locations/{location}/policy. */ + @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") + public static class LocationBuilder { + private String location; + + protected LocationBuilder() {} + + public String getLocation() { + return location; + } + + public LocationBuilder setLocation(String location) { + this.location = location; + return this; + } + + public PolicyName build() { + return new PolicyName(this); + } + } } diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java index c81c969d..39936150 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java @@ -286,6 +286,246 @@ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRu com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrThrow( java.lang.String key); + /** + * + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getKubernetesNamespaceAdmissionRulesCount(); + /** + * + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key); + /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getKubernetesNamespaceAdmissionRules(); + /** + * + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getKubernetesNamespaceAdmissionRulesMap(); + /** + * + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); + /** + * + * + *
+   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
+   *   `[a-z.-]+`, e.g. `some-namespace`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getKubernetesServiceAccountAdmissionRulesCount(); + /** + * + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key); + /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getKubernetesServiceAccountAdmissionRules(); + /** + * + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getKubernetesServiceAccountAdmissionRulesMap(); + /** + * + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); + /** + * + * + *
+   * Optional. Per-kubernetes-service-account admission rules. Service account
+   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key); + + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getIstioServiceIdentityAdmissionRulesCount(); + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key); + /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ + @java.lang.Deprecated + java.util.Map + getIstioServiceIdentityAdmissionRules(); + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.Map + getIstioServiceIdentityAdmissionRulesMap(); + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrDefault( + java.lang.String key, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); + /** + * + * + *
+   * Optional. Per-istio-service-identity admission rules. Istio service
+   * identity spec format:
+   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
+   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
+   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
+   * 
+ * + * + * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule + getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key); + /** * * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java index 826cbb4e..58679c21 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java @@ -125,12 +125,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * @@ -147,12 +144,9 @@ public boolean hasAttestor() { * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * @@ -171,12 +165,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * @@ -537,12 +528,9 @@ public Builder mergeFrom( * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -558,12 +546,9 @@ public boolean hasAttestor() { * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -585,12 +570,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -614,12 +596,9 @@ public Builder setAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -641,12 +620,9 @@ public Builder setAttestor( * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -674,12 +650,9 @@ public Builder mergeAttestor(com.google.cloud.binaryauthorization.v1beta1.Attest * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -701,12 +674,9 @@ public Builder clearAttestor() { * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -722,12 +692,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder getAttestor * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * @@ -747,12 +714,9 @@ public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttesto * * *
-     * Required. The updated
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-     * service will overwrite the [attestor
-     * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-     * the resource name in the request URL, in the format
-     * `projects/*/attestors/*`.
+     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+     * in the request URL, in the format `projects/*/attestors/*`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java index 67b57d87..b190c113 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java @@ -27,12 +27,9 @@ public interface UpdateAttestorRequestOrBuilder * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * @@ -46,12 +43,9 @@ public interface UpdateAttestorRequestOrBuilder * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * @@ -65,12 +59,9 @@ public interface UpdateAttestorRequestOrBuilder * * *
-   * Required. The updated
-   * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The
-   * service will overwrite the [attestor
-   * name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with
-   * the resource name in the request URL, in the format
-   * `projects/*/attestors/*`.
+   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
+   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
+   * in the request URL, in the format `projects/*/attestors/*`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java index a5516515..1a948a5b 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java @@ -125,11 +125,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * @@ -146,11 +144,9 @@ public boolean hasPolicy() { * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * @@ -169,11 +165,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy() { * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * @@ -530,11 +524,9 @@ public Builder mergeFrom( * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -550,11 +542,9 @@ public boolean hasPolicy() { * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -576,11 +566,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy() { * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -604,11 +592,9 @@ public Builder setPolicy(com.google.cloud.binaryauthorization.v1beta1.Policy val * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -630,11 +616,9 @@ public Builder setPolicy( * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -662,11 +646,9 @@ public Builder mergePolicy(com.google.cloud.binaryauthorization.v1beta1.Policy v * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -688,11 +670,9 @@ public Builder clearPolicy() { * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -708,11 +688,9 @@ public com.google.cloud.binaryauthorization.v1beta1.Policy.Builder getPolicyBuil * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * @@ -732,11 +710,9 @@ public com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder getPolicyOrB * * *
-     * Required. A new or updated
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-     * service will overwrite the [policy
-     * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-     * resource name in the request URL, in the format `projects/*/policy`.
+     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+     * the request URL, in the format `projects/*/policy`.
      * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java index a22366a6..e13358f7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java @@ -27,11 +27,9 @@ public interface UpdatePolicyRequestOrBuilder * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * @@ -45,11 +43,9 @@ public interface UpdatePolicyRequestOrBuilder * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * @@ -63,11 +59,9 @@ public interface UpdatePolicyRequestOrBuilder * * *
-   * Required. A new or updated
-   * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The
-   * service will overwrite the [policy
-   * name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the
-   * resource name in the request URL, in the format `projects/*/policy`.
+   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
+   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
+   * the request URL, in the format `projects/*/policy`.
    * 
* * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java index 11e60f46..dd2db543 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java @@ -22,9 +22,8 @@ * * *
- * An [user owned drydock
- * note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote]
- * references a Drydock ATTESTATION_AUTHORITY Note created by the user.
+ * An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock
+ * ATTESTATION_AUTHORITY Note created by the user.
  * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote} @@ -565,9 +564,8 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * An [user owned drydock
-   * note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote]
-   * references a Drydock ATTESTATION_AUTHORITY Note created by the user.
+   * An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock
+   * ATTESTATION_AUTHORITY Note created by the user.
    * 
* * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto index b596df9b..3e5b638f 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC. +// 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. @@ -11,16 +11,15 @@ // WITHOUT 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.binaryauthorization.v1beta1; -import "google/api/annotations.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1"; @@ -31,12 +30,12 @@ option java_package = "com.google.cloud.binaryauthorization.v1beta1"; option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1"; option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; -// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for container -// image binary authorization. +// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization. message Policy { option (google.api.resource) = { type: "binaryauthorization.googleapis.com/Policy" pattern: "projects/{project}/policy" + pattern: "locations/{location}/policy" }; enum GlobalPolicyEvaluationMode { @@ -61,14 +60,12 @@ message Policy { // policy for common system-level images. Images not covered by the global // policy will be subject to the project admission policy. This setting // has no effect when specified inside a global admission policy. - GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 - [(google.api.field_behavior) = OPTIONAL]; + GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(google.api.field_behavior) = OPTIONAL]; // Optional. Admission policy allowlisting. A matching admission request will // always be permitted. This feature is typically used to exclude Google or // third-party infrastructure images from Binary Authorization policies. - repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 - [(google.api.field_behavior) = OPTIONAL]; + repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. Per-cluster admission rules. Cluster spec format: // `location.clusterId`. There can be at most one admission rule per cluster @@ -77,38 +74,50 @@ message Policy { // (e.g. us-central1). // For `clusterId` syntax restrictions see // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - map cluster_admission_rules = 3 - [(google.api.field_behavior) = OPTIONAL]; + map cluster_admission_rules = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: + // `[a-z.-]+`, e.g. `some-namespace` + map kubernetes_namespace_admission_rules = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-kubernetes-service-account admission rules. Service account + // spec format: `namespace:serviceaccount`. e.g. `test-ns:default` + map kubernetes_service_account_admission_rules = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Per-istio-service-identity admission rules. Istio service + // identity spec format: + // `spiffe:///ns//sa/` or + // `/ns//sa/` + // e.g. `spiffe://example.com/ns/test-ns/sa/default` + map istio_service_identity_admission_rules = 9 [(google.api.field_behavior) = OPTIONAL]; // Required. Default admission rule for a cluster without a per-cluster, per- // kubernetes-service-account, or per-istio-service-identity admission rule. - AdmissionRule default_admission_rule = 4 - [(google.api.field_behavior) = REQUIRED]; + AdmissionRule default_admission_rule = 4 [(google.api.field_behavior) = REQUIRED]; // Output only. Time when the policy was last updated. - google.protobuf.Timestamp update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// An [admission allowlist -// pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] -// exempts images from checks by [admission -// rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. +// An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images +// from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. message AdmissionWhitelistPattern { - // An image name pattern to allow, in the form `registry/path/to/image`. + // An image name pattern to allowlist, in the form `registry/path/to/image`. // This supports a trailing `*` as a wildcard, but this is allowed only in - // text after the `registry/` part. + // text after the `registry/` part. `*` wildcard does not match `/`, i.e., + // `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match + // `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which + // matches subdirectories, i.e., `gcr.io/nginx**` matches + // `gcr.io/nginx/image`. string name_pattern = 1; } -// An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] -// specifies either that all container images used in a pod creation request -// must be attested to by one or more -// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod -// creations will be allowed, or that all pod creations will be denied. +// An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images +// used in a pod creation request must be attested to by one or more +// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all +// pod creations will be denied. // -// Images matching an [admission allowlist -// pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] +// Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] // are exempted from admission rules and will never block a pod creation. message AdmissionRule { enum EvaluationMode { @@ -119,7 +128,7 @@ message AdmissionRule { ALWAYS_ALLOW = 1; // This rule allows a pod creation if all the attestors listed in - // 'require_attestations_by' have valid attestations for all of the + // `require_attestations_by` have valid attestations for all of the // images in the pod spec. REQUIRE_ATTESTATION = 2; @@ -152,16 +161,15 @@ message AdmissionRule { // // Note: this field must be non-empty when the evaluation_mode field specifies // REQUIRE_ATTESTATION, otherwise it must be empty. - repeated string require_attestations_by = 2 - [(google.api.field_behavior) = OPTIONAL]; + repeated string require_attestations_by = 2 [(google.api.field_behavior) = OPTIONAL]; // Required. The action when a pod creation is denied by the admission rule. EnforcementMode enforcement_mode = 3 [(google.api.field_behavior) = REQUIRED]; } -// An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests -// to container image artifacts. An existing attestor cannot be modified except -// where indicated. +// An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image +// artifacts. An existing attestor cannot be modified except where +// indicated. message Attestor { option (google.api.resource) = { type: "binaryauthorization.googleapis.com/Attestor" @@ -176,24 +184,22 @@ message Attestor { // The field may be displayed in chooser dialogs. string description = 6 [(google.api.field_behavior) = OPTIONAL]; - // Required. Identifies an - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests - // to a container image artifact. This determines how an attestation will be - // stored, and how it will be used during policy enforcement. Updates may not - // change the attestor type, but individual attestor fields may be updated + // Required. Identifies an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to a + // container image artifact. This determines how an attestation will + // be stored, and how it will be used during policy + // enforcement. Updates may not change the attestor type, but individual + // attestor fields may be updated. oneof attestor_type { // A Drydock ATTESTATION_AUTHORITY Note, created by the user. UserOwnedDrydockNote user_owned_drydock_note = 3; } // Output only. Time when the attestor was last updated. - google.protobuf.Timestamp update_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } -// An [user owned drydock -// note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] -// references a Drydock ATTESTATION_AUTHORITY Note created by the user. +// An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock +// ATTESTATION_AUTHORITY Note created by the user. message UserOwnedDrydockNote { // Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, // created by the user, in the format: `projects/*/notes/*` (or the legacy @@ -213,8 +219,7 @@ message UserOwnedDrydockNote { // // If this field is empty, this attestor always returns that no // valid attestations exist. - repeated AttestorPublicKey public_keys = 2 - [(google.api.field_behavior) = OPTIONAL]; + repeated AttestorPublicKey public_keys = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. This field will contain the service account email address // that this Attestor will use as the principal when querying Container @@ -225,8 +230,7 @@ message UserOwnedDrydockNote { // This email address is fixed for the lifetime of the Attestor, but callers // should not make any other assumptions about the service account email; // future versions may use an email based on a different naming pattern. - string delegation_service_account_email = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; + string delegation_service_account_email = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // A public key in the PkixPublicKey format (see @@ -241,6 +245,8 @@ message PkixPublicKey { // See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz // might support additional public key types independently of Tink and/or KMS. enum SignatureAlgorithm { + option allow_alias = true; + // Not specified. SIGNATURE_ALGORITHM_UNSPECIFIED = 0; @@ -271,11 +277,20 @@ message PkixPublicKey { // ECDSA on the NIST P-256 curve with a SHA256 digest. ECDSA_P256_SHA256 = 9; + // ECDSA on the NIST P-256 curve with a SHA256 digest. + EC_SIGN_P256_SHA256 = 9; + // ECDSA on the NIST P-384 curve with a SHA384 digest. ECDSA_P384_SHA384 = 10; + // ECDSA on the NIST P-384 curve with a SHA384 digest. + EC_SIGN_P384_SHA384 = 10; + // ECDSA on the NIST P-521 curve with a SHA512 digest. ECDSA_P521_SHA512 = 11; + + // ECDSA on the NIST P-521 curve with a SHA512 digest. + EC_SIGN_P521_SHA512 = 11; } // A PEM-encoded public key, as described in @@ -290,9 +305,8 @@ message PkixPublicKey { SignatureAlgorithm signature_algorithm = 2; } -// An [attestor public -// key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be -// used to verify attestations signed by this attestor. +// An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify +// attestations signed by this attestor. message AttestorPublicKey { // Optional. A descriptive comment. This field may be updated. string comment = 1 [(google.api.field_behavior) = OPTIONAL]; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto index 3f6c5abb..90e63b4d 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2019 Google LLC. +// 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. @@ -11,7 +11,6 @@ // WITHOUT 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"; @@ -44,19 +43,15 @@ option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; // * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] service BinauthzManagementServiceV1Beta1 { option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must - // attest to a container image, before the project is allowed to deploy that + // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to + // a container image, before the project is allowed to deploy that // image. There is at most one policy per project. All image admission // requests are permitted if a project has no policy. // - // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this - // project. Returns a default - // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project - // does not have one. + // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default + // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. rpc GetPolicy(GetPolicyRequest) returns (Policy) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/policy}" @@ -64,13 +59,11 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.method_signature) = "name"; } - // Creates or updates a project's - // [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a - // copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. - // A policy is always updated as a whole, to avoid race conditions with - // concurrent policy enforcement (or management!) requests. Returns NOT_FOUND - // if the project does not exist, INVALID_ARGUMENT if the request is - // malformed. + // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the + // new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race + // conditions with concurrent policy enforcement (or management!) + // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT + // if the request is malformed. rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) { option (google.api.http) = { put: "/v1beta1/{policy.name=projects/*/policy}" @@ -79,13 +72,10 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.method_signature) = "policy"; } - // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], - // and returns a copy of the new - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns - // NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is - // malformed, ALREADY_EXISTS if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already - // exists. + // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, + // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) { option (google.api.http) = { post: "/v1beta1/{parent=projects/*}/attestors" @@ -95,9 +85,7 @@ service BinauthzManagementServiceV1Beta1 { } // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns NOT_FOUND if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - // exist. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. rpc GetAttestor(GetAttestorRequest) returns (Attestor) { option (google.api.http) = { get: "/v1beta1/{name=projects/*/attestors/*}" @@ -106,9 +94,7 @@ service BinauthzManagementServiceV1Beta1 { } // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns NOT_FOUND if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - // exist. + // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) { option (google.api.http) = { put: "/v1beta1/{attestor.name=projects/*/attestors/*}" @@ -126,10 +112,8 @@ service BinauthzManagementServiceV1Beta1 { option (google.api.method_signature) = "parent"; } - // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns NOT_FOUND if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not - // exist. + // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the + // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1beta1/{name=projects/*/attestors/*}" @@ -140,9 +124,8 @@ service BinauthzManagementServiceV1Beta1 { // Request message for [BinauthzManagementService.GetPolicy][]. message GetPolicyRequest { - // Required. The resource name of the - // [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in - // the format `projects/*/policy`. + // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, + // in the format `projects/*/policy`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -151,20 +134,31 @@ message GetPolicyRequest { ]; } +// API for working with the system policy. +service SystemPolicyV1Beta1 { + option (google.api.default_host) = "binaryauthorization.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Gets the current system policy in the specified location. + rpc GetSystemPolicy(GetSystemPolicyRequest) returns (Policy) { + option (google.api.http) = { + get: "/v1beta1/{name=locations/*/policy}" + }; + option (google.api.method_signature) = "name"; + } +} + // Request message for [BinauthzManagementService.UpdatePolicy][]. message UpdatePolicyRequest { - // Required. A new or updated - // [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The - // service will overwrite the [policy - // name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the - // resource name in the request URL, in the format `projects/*/policy`. + // Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will + // overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in + // the request URL, in the format `projects/*/policy`. Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.CreateAttestor][]. message CreateAttestorRequest { - // Required. The parent of this - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. + // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -172,23 +166,19 @@ message CreateAttestorRequest { } ]; - // Required. The - // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. + // Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. string attestor_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The initial - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The - // service will overwrite the [attestor - // name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - // the resource name, in the format `projects/*/attestors/*`. + // Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name, + // in the format `projects/*/attestors/*`. Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.GetAttestor][]. message GetAttestorRequest { - // Required. The name of the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, - // in the format `projects/*/attestors/*`. + // Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format + // `projects/*/attestors/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -199,20 +189,16 @@ message GetAttestorRequest { // Request message for [BinauthzManagementService.UpdateAttestor][]. message UpdateAttestorRequest { - // Required. The updated - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The - // service will overwrite the [attestor - // name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with - // the resource name in the request URL, in the format - // `projects/*/attestors/*`. + // Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will + // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name + // in the request URL, in the format `projects/*/attestors/*`. Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED]; } // Request message for [BinauthzManagementService.ListAttestors][]. message ListAttestorsRequest { // Required. The resource name of the project associated with the - // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the - // format `projects/*`. + // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -225,9 +211,8 @@ message ListAttestorsRequest { int32 page_size = 2; // A token identifying a page of results the server should return. Typically, - // this is the value of - // [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] - // returned from the previous call to the `ListAttestors` method. + // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned + // from the previous call to the `ListAttestors` method. string page_token = 3; } @@ -237,17 +222,15 @@ message ListAttestorsResponse { repeated Attestor attestors = 1; // A token to retrieve the next page of results. Pass this value in the - // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] - // field in the subsequent call to the `ListAttestors` method to retrieve the - // next page of results. + // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the + // `ListAttestors` method to retrieve the next page of results. string next_page_token = 2; } // Request message for [BinauthzManagementService.DeleteAttestor][]. message DeleteAttestorRequest { - // Required. The name of the - // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, - // in the format `projects/*/attestors/*`. + // Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format + // `projects/*/attestors/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -255,3 +238,15 @@ message DeleteAttestorRequest { } ]; } + +// Request to read the current system policy. +message GetSystemPolicyRequest { + // Required. The resource name, in the format `locations/*/policy`. + // Note that the system policy is not associated with a project. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "binaryauthorization.googleapis.com/Policy" + } + ]; +} From 8ad422a8496a8a76722ac022dddfe3f0a15b682d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 11 Nov 2021 21:08:18 +0000 Subject: [PATCH 020/203] chore: update minimum java version to java 8 (#1281) (#117) --- .github/.OwlBot.lock.yaml | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 886d0949..5d788be0 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:14ecf64ec36f67c7bf04e3dc0f68eafcc01df3955121c38862b695e2ae7515d8 + digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0 diff --git a/README.md b/README.md index 32ca69f6..464faa04 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ Binary Authorization uses gRPC for the transport layer. ## Supported Java Versions -Java 7 or above is required for using this client. +Java 8 or above is required for using this client. Google's Java client libraries, [Google Cloud Client Libraries][cloudlibs] @@ -156,7 +156,6 @@ Apache 2.0 - See [LICENSE][license] for more information. Java Version | Status ------------ | ------ -Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] From 6f13f2ac75045e07ce127a6423f69e9224b1721e Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 15 Nov 2021 17:22:34 +0100 Subject: [PATCH 021/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 (#118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.4.0` -> `2.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.0/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​250-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare240v250-2021-11-12) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.4.0...v2.5.0) ##### Features - next release from main branch is 2.5.0 ([#​510](https://www.togithub.com/googleapis/java-shared-dependencies/issues/510)) ([ca9eb8a](https://www.github.com/googleapis/java-shared-dependencies/commit/ca9eb8a40ae81d69de0d82d9499ef21b0136ae49)) ##### Bug Fixes - dependencies.sh to work with Java 17 ([#​516](https://www.togithub.com/googleapis/java-shared-dependencies/issues/516)) ([8422c1d](https://www.github.com/googleapis/java-shared-dependencies/commit/8422c1d7e9ef479f348e63c530789050b5235426)) ##### Dependencies - update dependency com.google.api:api-common to v2.1.0 ([#​508](https://www.togithub.com/googleapis/java-shared-dependencies/issues/508)) ([ae32d16](https://www.github.com/googleapis/java-shared-dependencies/commit/ae32d1689c78fc1469206c8c0df0ebaca59edd2c)) - update dependency com.google.auth:google-auth-library-bom to v1.2.2 ([#​506](https://www.togithub.com/googleapis/java-shared-dependencies/issues/506)) ([b9a8209](https://www.github.com/googleapis/java-shared-dependencies/commit/b9a82098655f29e858bd0c7a9b1049a379e5062a)) - update dependency com.google.auth:google-auth-library-bom to v1.3.0 ([#​524](https://www.togithub.com/googleapis/java-shared-dependencies/issues/524)) ([fc07879](https://www.github.com/googleapis/java-shared-dependencies/commit/fc07879fa6531e39b21977fe77abc19354a1fd33)) - update dependency com.google.code.gson:gson to v2.8.9 ([#​509](https://www.togithub.com/googleapis/java-shared-dependencies/issues/509)) ([bece99b](https://www.github.com/googleapis/java-shared-dependencies/commit/bece99bb3e0365e60e7376ba18d046ab6436a235)) - update dependency com.google.errorprone:error_prone_annotations to v2.10.0 ([#​512](https://www.togithub.com/googleapis/java-shared-dependencies/issues/512)) ([c281f13](https://www.github.com/googleapis/java-shared-dependencies/commit/c281f137525e2111e97349657be578ed1fc832f2)) - update dependency com.google.protobuf:protobuf-bom to v3.19.1 ([#​505](https://www.togithub.com/googleapis/java-shared-dependencies/issues/505)) ([94cde96](https://www.github.com/googleapis/java-shared-dependencies/commit/94cde96069900f9f8c2ff9a522671d03b26828bd)) - update dependency io.grpc:grpc-bom to v1.42.1 ([#​513](https://www.togithub.com/googleapis/java-shared-dependencies/issues/513)) ([0d2b774](https://www.github.com/googleapis/java-shared-dependencies/commit/0d2b774287a132821cc6fe2789140086bc48d525)) - update dependency org.checkerframework:checker-qual to v3.19.0 ([#​501](https://www.togithub.com/googleapis/java-shared-dependencies/issues/501)) ([2b3e0b5](https://www.github.com/googleapis/java-shared-dependencies/commit/2b3e0b5ddc3a645b20a837f3123394f1ca114f08)) - update dependency org.threeten:threetenbp to v1.5.2 ([#​514](https://www.togithub.com/googleapis/java-shared-dependencies/issues/514)) ([4885f40](https://www.github.com/googleapis/java-shared-dependencies/commit/4885f402e2c70435cd10d4f1b893df9873808c56)) - update gax.version to v2.7.0 ([#​515](https://www.togithub.com/googleapis/java-shared-dependencies/issues/515)) ([567e728](https://www.github.com/googleapis/java-shared-dependencies/commit/567e728b0e59233a04e2d04183e6a0c36cca2437)) - update google.core.version to v2.3.0 ([#​530](https://www.togithub.com/googleapis/java-shared-dependencies/issues/530)) ([78e87e9](https://www.github.com/googleapis/java-shared-dependencies/commit/78e87e96befab34dc4a494e752aeb473cd14a156)) - update iam.version to v1.1.7 ([#​504](https://www.togithub.com/googleapis/java-shared-dependencies/issues/504)) ([63dd583](https://www.github.com/googleapis/java-shared-dependencies/commit/63dd583c80f35b01a66fd1908d41467468c66436))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ebd48c2f..b68f9e31 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.4.0 + 2.5.0 pom import From fceee93149a3576c32cbca171882910f05fd7e2d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 15 Nov 2021 20:34:17 +0000 Subject: [PATCH 022/203] feat: add new admission rule types to Policy feat: update SignatureAlgorithm enum to match algorithm names in KMS feat: add SystemPolicyV1Beta1 service (#112) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 408346628 Source-Link: https://github.com/googleapis/googleapis/commit/3dfbdc3562ff366c3b3b21baeef1e704ffce4b39 Source-Link: https://github.com/googleapis/googleapis-gen/commit/b73ff6824f3947aed2eb08fc4f6976af74a5621c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjczZmY2ODI0ZjM5NDdhZWQyZWIwOGZjNGY2OTc2YWY3NGE1NjIxYyJ9 --- .../binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java | 1 - 1 file changed, 1 deletion(-) diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java index 3ae0b37b..cf64caca 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java @@ -27,7 +27,6 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated public final class SystemPolicyV1Beta1Grpc { private SystemPolicyV1Beta1Grpc() {} From eb6adf1b3b07ae28969ed692cfe8a4fa5cd7c58a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 19:44:36 +0100 Subject: [PATCH 023/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.2 (#120) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.1` -> `1.2.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/compatibility-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.2/confidence-slim/1.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.2`](https://togithub.com/googleapis/java-shared-config/blob/master/CHANGELOG.md#​122-httpswwwgithubcomgoogleapisjava-shared-configcomparev121v122-2021-11-16) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.1...v1.2.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 474dae56..318059be 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index b68f9e31..2118b0e8 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.1 + 1.2.2 From f38a45bac205d85251c9c968d39dd0d4a10c0e57 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 17 Nov 2021 23:50:27 +0100 Subject: [PATCH 024/203] deps: update dependency io.grafeas:grafeas to v2.1.2 (#119) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.1.1` -> `2.1.2` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.2/compatibility-slim/2.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.1.2/confidence-slim/2.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.1.2`](https://togithub.com/googleapis/java-grafeas/blob/master/CHANGELOG.md#​212-httpswwwgithubcomgoogleapisjava-grafeascomparev211v212-2021-11-15) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.1.1...v2.1.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2118b0e8..701a3880 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.1.1 + 2.1.2 From 29c0b6f38ae7abec82144f43de2d7f3ff60db392 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 Nov 2021 18:34:31 +0000 Subject: [PATCH 025/203] chore: remove enable-samples profile (#1284) (#121) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 1 - CONTRIBUTING.md | 61 +++++---------------------------------- 3 files changed, 8 insertions(+), 56 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 5d788be0..88d9b926 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a744afda1956beb7bd6dc8d0b740a7839bbe402e34e2f4ef24589074db53ceb0 + digest: sha256:5b8c790f57cca57e6b37ba25f79291265c218cea3e6ba9714b001910ab3f1419 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 3a539b64..3cea24b6 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -91,7 +91,6 @@ samples) pushd ${SAMPLES_DIR} mvn -B \ - -Penable-samples \ -ntp \ -DtrimStackTrace=false \ -Dclirr.skip=true \ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f2dbdee0..b65dd279 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,12 +53,12 @@ mvn -Penable-integration-tests clean verify ## Code Samples -Code Samples must be bundled in separate Maven modules, and guarded by a -Maven profile with the name `enable-samples`. +All code samples must be in compliance with the [java sample formatting guide][3]. +Code Samples must be bundled in separate Maven modules. The samples must be separate from the primary project for a few reasons: -1. Primary projects have a minimum Java version of Java 7 whereas samples have - a minimum Java version of Java 8. Due to this we need the ability to +1. Primary projects have a minimum Java version of Java 8 whereas samples can have + Java version of Java 11. Due to this we need the ability to selectively exclude samples from a build run. 2. Many code samples depend on external GCP services and need credentials to access the service. @@ -68,39 +68,16 @@ The samples must be separate from the primary project for a few reasons: ### Building ```bash -mvn -Penable-samples clean verify +mvn clean verify ``` Some samples require access to GCP services and require a service account: ```bash export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json -mvn -Penable-samples clean verify +mvn clean verify ``` -### Profile Config - -1. To add samples in a profile to your Maven project, add the following to your -`pom.xml` - - ```xml - - [...] - - - enable-samples - - sample - - - - [...] - - ``` - -2. [Activate](#profile-activation) the profile. -3. Define your samples in a normal Maven project in the `samples/` directory. - ### Code Formatting Code in this repo is formatted with @@ -110,30 +87,6 @@ To run formatting on your project, you can run: mvn com.coveo:fmt-maven-plugin:format ``` -### Profile Activation - -To include code samples when building and testing the project, enable the -`enable-samples` Maven profile. - -#### Command line - -To activate the Maven profile on the command line add `-Penable-samples` to your -Maven command. - -#### Maven `settings.xml` - -To activate the Maven profile in your `~/.m2/settings.xml` add an entry of -`enable-samples` following the instructions in [Active Profiles][2]. - -This method has the benefit of applying to all projects you build (and is -respected by IntelliJ IDEA) and is recommended if you are going to be -contributing samples to several projects. - -#### IntelliJ IDEA - -To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in -[Activate Maven profiles][3] to activate `enable-samples`. - [1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account [2]: https://maven.apache.org/settings.html#Active_Profiles -[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles +[3]: https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md \ No newline at end of file From c75a6ac8ac2393d630046e69a3626ce64301dac9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 3 Dec 2021 18:00:20 +0100 Subject: [PATCH 026/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 (#124) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.5.0` -> `2.5.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/compatibility-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.5.1/confidence-slim/2.5.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.5.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/master/CHANGELOG.md#​251-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare250v251-2021-12-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.5.0...v2.5.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 701a3880..e4f7b19f 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.5.0 + 2.5.1 pom import From 1fd688a59ed534255191e4b8ab2753a4750e2e8c Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 19:06:16 +0000 Subject: [PATCH 027/203] fix(java): add -ntp flag to native image testing command (#1299) (#126) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 88d9b926..3d2f8282 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:5b8c790f57cca57e6b37ba25f79291265c218cea3e6ba9714b001910ab3f1419 + digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87 diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 3cea24b6..4f482914 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -71,7 +71,7 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn test -Pnative -Penable-integration-tests + mvn -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; samples) From 1bc6eb94978eae34a5e1a28a1d9067fad47596de Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Dec 2021 21:06:46 +0100 Subject: [PATCH 028/203] deps: update dependency io.grafeas:grafeas to v2.1.3 (#125) --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e4f7b19f..aa9bd361 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.1.2 + 2.1.3 From 8a80e6cb195ec0e9dc951c424a435d4a7169f152 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 12:32:34 -0800 Subject: [PATCH 029/203] chore: release 0.4.0 (#105) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 24 +++++++++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 +++++----- google-cloud-binary-authorization/pom.xml | 4 ++-- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 +++++----- .../pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 ++++---- 9 files changed, 51 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d0f6dbbb..d862f301 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,29 @@ # Changelog +## [0.4.0](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.3...v0.4.0) (2021-12-06) + + +### Features + +* add new admission rule types to Policy feat: update SignatureAlgorithm enum to match algorithm names in KMS feat: add SystemPolicyV1Beta1 service ([#112](https://www.github.com/googleapis/java-binary-authorization/issues/112)) ([fceee93](https://www.github.com/googleapis/java-binary-authorization/commit/fceee93149a3576c32cbca171882910f05fd7e2d)) +* binaryauthorization v1 public protos ([#90](https://www.github.com/googleapis/java-binary-authorization/issues/90)) ([f5315fc](https://www.github.com/googleapis/java-binary-authorization/commit/f5315fcb4761ac78e0b66945a8ee3b6d6f5e85eb)) + + +### Bug Fixes + +* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-binary-authorization/issues/1299)) ([#126](https://www.github.com/googleapis/java-binary-authorization/issues/126)) ([1fd688a](https://www.github.com/googleapis/java-binary-authorization/commit/1fd688a59ed534255191e4b8ab2753a4750e2e8c)) +* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-binary-authorization/issues/1266)) ([#107](https://www.github.com/googleapis/java-binary-authorization/issues/107)) ([47a899b](https://www.github.com/googleapis/java-binary-authorization/commit/47a899b73033fd800d7671bd6d9d7e5575831ab8)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#118](https://www.github.com/googleapis/java-binary-authorization/issues/118)) ([6f13f2a](https://www.github.com/googleapis/java-binary-authorization/commit/6f13f2ac75045e07ce127a6423f69e9224b1721e)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#124](https://www.github.com/googleapis/java-binary-authorization/issues/124)) ([c75a6ac](https://www.github.com/googleapis/java-binary-authorization/commit/c75a6ac8ac2393d630046e69a3626ce64301dac9)) +* update dependency io.grafeas:grafeas to v2.1.0 ([#108](https://www.github.com/googleapis/java-binary-authorization/issues/108)) ([1853da6](https://www.github.com/googleapis/java-binary-authorization/commit/1853da6f67619f4f74db0948e82685f2147d18ae)) +* update dependency io.grafeas:grafeas to v2.1.1 ([#109](https://www.github.com/googleapis/java-binary-authorization/issues/109)) ([1ebd94b](https://www.github.com/googleapis/java-binary-authorization/commit/1ebd94b6cbf7518f806db8fd8c846507173a4c8b)) +* update dependency io.grafeas:grafeas to v2.1.2 ([#119](https://www.github.com/googleapis/java-binary-authorization/issues/119)) ([f38a45b](https://www.github.com/googleapis/java-binary-authorization/commit/f38a45bac205d85251c9c968d39dd0d4a10c0e57)) +* update dependency io.grafeas:grafeas to v2.1.3 ([#125](https://www.github.com/googleapis/java-binary-authorization/issues/125)) ([1bc6eb9](https://www.github.com/googleapis/java-binary-authorization/commit/1bc6eb94978eae34a5e1a28a1d9067fad47596de)) + ### [0.3.3](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.2...v0.3.3) (2021-10-19) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 318059be..4f4232fc 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.3.4-SNAPSHOT + 0.4.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 215f8e97..9a20b8a4 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.3.4-SNAPSHOT + 0.4.0 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.3.4-SNAPSHOT + 0.4.0 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 2d0f6f5d..c49c25df 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index bfb3d1d0..ebf9093b 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/pom.xml b/pom.xml index aa9bd361..05515a3a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.3.4-SNAPSHOT + 0.4.0 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index b520f7b3..59a4405a 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.3.4-SNAPSHOT + 0.4.0 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 79332fe2..c285b319 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.3.4-SNAPSHOT + 0.4.0 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.3.4-SNAPSHOT + 0.4.0 diff --git a/versions.txt b/versions.txt index 6608cb0e..cb9fff71 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.3.3:0.3.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:0.3.3:0.3.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.3.3:0.3.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1:0.3.3:0.3.4-SNAPSHOT +google-cloud-binary-authorization:0.4.0:0.4.0 +grpc-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.0 +grpc-google-cloud-binary-authorization-v1:0.4.0:0.4.0 +proto-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.0 +proto-google-cloud-binary-authorization-v1:0.4.0:0.4.0 From ad25c5b281ce9b54f6c32a3998b69663b03fd949 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 6 Dec 2021 20:38:12 +0000 Subject: [PATCH 030/203] chore: release 0.4.1-SNAPSHOT (#127) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 4f4232fc..47994f84 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.4.0 + 0.4.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 9a20b8a4..1b2e675c 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.4.0 + 0.4.1-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index c49c25df..5cddf957 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index ebf9093b..2d8ae679 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 05515a3a..a1546b7e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.4.0 + 0.4.1-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 59a4405a..eb4200d5 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.0 + 0.4.1-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index c285b319..4359f1a4 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.0 + 0.4.1-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.0 + 0.4.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index cb9fff71..be533cc4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.4.0:0.4.0 -grpc-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.0 -grpc-google-cloud-binary-authorization-v1:0.4.0:0.4.0 -proto-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.0 -proto-google-cloud-binary-authorization-v1:0.4.0:0.4.0 +google-cloud-binary-authorization:0.4.0:0.4.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:0.4.0:0.4.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1:0.4.0:0.4.1-SNAPSHOT From 39c6c44342f286d94727a15e825045913e1abb7c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 6 Dec 2021 23:24:59 +0100 Subject: [PATCH 031/203] chore(deps): update dependency com.google.cloud:google-cloud-binary-authorization to v0.4.0 (#128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore(deps): update dependency com.google.cloud:google-cloud-binary-authorization to v0.4.0 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- README.md | 6 +++--- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 464faa04..3b735cbb 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.4.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:0.3.3' +implementation 'com.google.cloud:google-cloud-binary-authorization:0.4.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.3.3" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.4.0" ``` ## Authentication diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index b3440577..500d7ac9 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.4.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 47016f17..a4ccbb2b 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.4.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 07bd868c..671ab4b5 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.3.3 + 0.4.0 From 7c086faaea1321b18524bb2cbf7bb5bcaea96a39 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 9 Dec 2021 00:14:11 +0100 Subject: [PATCH 032/203] chore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.2.0 (#123) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud.samples:shared-configuration](https://togithub.com/GoogleCloudPlatform/java-repo-tools) | `1.0.23` -> `1.2.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/compatibility-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud.samples:shared-configuration/1.2.0/confidence-slim/1.0.23)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
GoogleCloudPlatform/java-repo-tools ### [`v1.2.0`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.24...v1.2.0) ### [`v1.0.24`](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24) [Compare Source](https://togithub.com/GoogleCloudPlatform/java-repo-tools/compare/v1.0.23...v1.0.24)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/install-without-bom/pom.xml | 2 +- samples/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index 500d7ac9..ee13f8a0 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/pom.xml b/samples/pom.xml index 8ad890ae..a599061d 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -18,7 +18,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index a4ccbb2b..f79e2d60 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index 671ab4b5..a214029a 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -14,7 +14,7 @@ com.google.cloud.samples shared-configuration - 1.0.23 + 1.2.0 From 0fd5b4439f807c37f56695c63b81693be8e5fbc1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 5 Jan 2022 17:04:16 +0000 Subject: [PATCH 033/203] fix(java): run Maven in plain console-friendly mode (#1301) (#131) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/build.sh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 3d2f8282..731a0eb4 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:a4d7b2cfc6a9d6b378a6b2458740eae15fcab28854bd23dad3a15102d2e47c87 + digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 4f482914..4fe815fd 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -47,15 +47,15 @@ set +e case ${JOB_TYPE} in test) - mvn test -B -Dclirr.skip=true -Denforcer.skip=true + mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true RETURN_CODE=$? ;; lint) - mvn com.coveo:fmt-maven-plugin:check + mvn com.coveo:fmt-maven-plugin:check -B -ntp RETURN_CODE=$? ;; javadoc) - mvn javadoc:javadoc javadoc:test-javadoc + mvn javadoc:javadoc javadoc:test-javadoc -B -ntp RETURN_CODE=$? ;; integration) @@ -71,7 +71,7 @@ integration) ;; graalvm) # Run Unit and Integration Tests with Native Image - mvn -ntp -Pnative -Penable-integration-tests test + mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test RETURN_CODE=$? ;; samples) @@ -104,7 +104,7 @@ samples) fi ;; clirr) - mvn -B -Denforcer.skip=true clirr:check + mvn -B -ntp -Denforcer.skip=true clirr:check RETURN_CODE=$? ;; *) From 872581640fdd0a9e3a022216e916a2e5636cb419 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Jan 2022 19:58:31 +0100 Subject: [PATCH 034/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.4 (#133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.2` -> `1.2.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.4/compatibility-slim/1.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.4/confidence-slim/1.2.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.4`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​124-httpswwwgithubcomgoogleapisjava-shared-configcomparev123v124-2022-01-06) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.3...v1.2.4) ### [`v1.2.3`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​123-httpswwwgithubcomgoogleapisjava-shared-configcomparev122v123-2022-01-04) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.2...v1.2.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 47994f84..a4379fcd 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.2 + 1.2.4 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index a1546b7e..67437e3d 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.2 + 1.2.4 From cc6736a38ecbb1d0ec96b8a1f0b6ca828f9ed1c9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 7 Jan 2022 16:14:25 +0100 Subject: [PATCH 035/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 (#134) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.5.1` -> `2.6.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.6.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.6.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.6.0/compatibility-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.6.0/confidence-slim/2.5.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.6.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​260-httpswwwgithubcomgoogleapisjava-shared-dependenciescompare251v260-2022-01-07) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.5.1...v2.6.0) ##### Bug Fixes - **java:** add -ntp flag to native image testing command ([#​1299](https://www.togithub.com/googleapis/java-shared-dependencies/issues/1299)) ([#​546](https://www.togithub.com/googleapis/java-shared-dependencies/issues/546)) ([d8bb8d9](https://www.github.com/googleapis/java-shared-dependencies/commit/d8bb8d9d8e3b8c582f768cd3164e8580ec334511)) - **java:** run Maven in plain console-friendly mode ([#​1301](https://www.togithub.com/googleapis/java-shared-dependencies/issues/1301)) ([#​557](https://www.togithub.com/googleapis/java-shared-dependencies/issues/557)) ([6b57d08](https://www.github.com/googleapis/java-shared-dependencies/commit/6b57d08816ec6c1dfb637cae022624e896930ad8)) ##### Dependencies - gRPC upgrade to 1.43.2 ([#​567](https://www.togithub.com/googleapis/java-shared-dependencies/issues/567)) ([c946655](https://www.github.com/googleapis/java-shared-dependencies/commit/c94665571f26d24fbbb3f89ef5a3db99663bfdba)) - update dependency com.google.api-client:google-api-client-bom to v1.33.0 ([#​563](https://www.togithub.com/googleapis/java-shared-dependencies/issues/563)) ([0aedddb](https://www.github.com/googleapis/java-shared-dependencies/commit/0aedddb9a535753767d56f5910f355c7a1c8509c)) - update dependency com.google.api:api-common to v2.1.2 ([2f154a3](https://www.github.com/googleapis/java-shared-dependencies/commit/2f154a3ff759211438c72859e98b314c7ff8405f)) - update dependency com.google.http-client:google-http-client-bom to v1.41.0 ([#​562](https://www.togithub.com/googleapis/java-shared-dependencies/issues/562)) ([6da0735](https://www.github.com/googleapis/java-shared-dependencies/commit/6da0735d4db9df998d11c549488a024b800bed65)) - update dependency io.grpc:grpc-bom to v1.43.1 ([#​553](https://www.togithub.com/googleapis/java-shared-dependencies/issues/553)) ([b787c8f](https://www.github.com/googleapis/java-shared-dependencies/commit/b787c8f2032b7ffc9797158c3ff214b7813f34b7)) - update dependency org.apache.httpcomponents:httpcore to v4.4.15 ([#​550](https://www.togithub.com/googleapis/java-shared-dependencies/issues/550)) ([e2d3dba](https://www.github.com/googleapis/java-shared-dependencies/commit/e2d3dbad6dd54c117abb5ab1b6137cfee4e5a32b)) - update dependency org.checkerframework:checker-qual to v3.20.0 ([#​549](https://www.togithub.com/googleapis/java-shared-dependencies/issues/549)) ([586df59](https://www.github.com/googleapis/java-shared-dependencies/commit/586df5949d4ddca11d0705d696882c32d8436c31)) - update gax.version to v2.8.0 ([#​564](https://www.togithub.com/googleapis/java-shared-dependencies/issues/564)) ([9ad5d4f](https://www.github.com/googleapis/java-shared-dependencies/commit/9ad5d4f5385753a0c5739ef400f5d346e3342b84)) - update gax.version to v2.8.1 ([2f154a3](https://www.github.com/googleapis/java-shared-dependencies/commit/2f154a3ff759211438c72859e98b314c7ff8405f)) - update google.common-protos.version to v2.7.1 ([#​561](https://www.togithub.com/googleapis/java-shared-dependencies/issues/561)) ([9aa860d](https://www.github.com/googleapis/java-shared-dependencies/commit/9aa860d92f745f1d4382eb16439bf17ac6ca8ae9)) - update google.core.version to v2.3.5 ([#​565](https://www.togithub.com/googleapis/java-shared-dependencies/issues/565)) ([2f154a3](https://www.github.com/googleapis/java-shared-dependencies/commit/2f154a3ff759211438c72859e98b314c7ff8405f)) - update iam.version to v1.2.0 ([#​547](https://www.togithub.com/googleapis/java-shared-dependencies/issues/547)) ([3232c82](https://www.github.com/googleapis/java-shared-dependencies/commit/3232c828b628cb604a200b3e569e56e758e5e11d)) - upgrading protobuf to 3.19.2 ([#​560](https://www.togithub.com/googleapis/java-shared-dependencies/issues/560)) ([7ef3325](https://www.github.com/googleapis/java-shared-dependencies/commit/7ef33250f5473348d3546210b7a534360f476101)) ##### [2.5.1](https://www.github.com/googleapis/java-shared-dependencies/compare/2.5.0...v2.5.1) (2021-12-03) ##### Dependencies - update dependency com.google.api:api-common to v2.1.1 ([#​533](https://www.togithub.com/googleapis/java-shared-dependencies/issues/533)) ([4e23adb](https://www.github.com/googleapis/java-shared-dependencies/commit/4e23adb666dfaa18ae8bf869aca030153de16d62)) - update gax.version to v2.7.1 ([#​544](https://www.togithub.com/googleapis/java-shared-dependencies/issues/544)) ([5a0c480](https://www.github.com/googleapis/java-shared-dependencies/commit/5a0c480671fa834e600edc6ac6fe77967d1b79b3)) - update google.common-protos.version to v2.7.0 ([#​542](https://www.togithub.com/googleapis/java-shared-dependencies/issues/542)) ([af97eb5](https://www.github.com/googleapis/java-shared-dependencies/commit/af97eb5d9cff397080fdb3d4a6dbf7c2692e0358)) - update google.core.version to v2.3.3 ([#​534](https://www.togithub.com/googleapis/java-shared-dependencies/issues/534)) ([885acef](https://www.github.com/googleapis/java-shared-dependencies/commit/885acefe4ff5313eb53dc43b4825ca597b97dcfd))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 67437e3d..3cb4c9d2 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.5.1 + 2.6.0 pom import From 99384695bf8ff7aeb68ee63395eb74724302ccdb Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Jan 2022 17:56:27 +0000 Subject: [PATCH 036/203] chore: release 0.4.1 (#132) :robot: I have created a release \*beep\* \*boop\* --- ### [0.4.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.4.0...v0.4.1) (2022-01-07) ### Bug Fixes * **java:** run Maven in plain console-friendly mode ([#1301](https://www.github.com/googleapis/java-binary-authorization/issues/1301)) ([#131](https://www.github.com/googleapis/java-binary-authorization/issues/131)) ([0fd5b44](https://www.github.com/googleapis/java-binary-authorization/commit/0fd5b4439f807c37f56695c63b81693be8e5fbc1)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#134](https://www.github.com/googleapis/java-binary-authorization/issues/134)) ([cc6736a](https://www.github.com/googleapis/java-binary-authorization/commit/cc6736a38ecbb1d0ec96b8a1f0b6ca828f9ed1c9)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 39 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d862f301..a4f64ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +### [0.4.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.4.0...v0.4.1) (2022-01-07) + + +### Bug Fixes + +* **java:** run Maven in plain console-friendly mode ([#1301](https://www.github.com/googleapis/java-binary-authorization/issues/1301)) ([#131](https://www.github.com/googleapis/java-binary-authorization/issues/131)) ([0fd5b44](https://www.github.com/googleapis/java-binary-authorization/commit/0fd5b4439f807c37f56695c63b81693be8e5fbc1)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#134](https://www.github.com/googleapis/java-binary-authorization/issues/134)) ([cc6736a](https://www.github.com/googleapis/java-binary-authorization/commit/cc6736a38ecbb1d0ec96b8a1f0b6ca828f9ed1c9)) + ## [0.4.0](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.3...v0.4.0) (2021-12-06) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index a4379fcd..ee699441 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.4.1-SNAPSHOT + 0.4.1 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 1b2e675c..c175c9d6 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.4.1-SNAPSHOT + 0.4.1 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.4.1-SNAPSHOT + 0.4.1 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 5cddf957..629da10e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 2d8ae679..54c439c4 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/pom.xml b/pom.xml index 3cb4c9d2..2e6afd37 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.4.1-SNAPSHOT + 0.4.1 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index eb4200d5..4d89a5fe 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1-SNAPSHOT + 0.4.1 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 4359f1a4..1f40cccf 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1-SNAPSHOT + 0.4.1 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1-SNAPSHOT + 0.4.1 diff --git a/versions.txt b/versions.txt index be533cc4..528b099e 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.4.0:0.4.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:0.4.0:0.4.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.4.0:0.4.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1:0.4.0:0.4.1-SNAPSHOT +google-cloud-binary-authorization:0.4.1:0.4.1 +grpc-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.1 +grpc-google-cloud-binary-authorization-v1:0.4.1:0.4.1 +proto-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.1 +proto-google-cloud-binary-authorization-v1:0.4.1:0.4.1 From 9cc82b88975cc9863c01007edcf6d52c4d0c64d4 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 7 Jan 2022 18:02:20 +0000 Subject: [PATCH 037/203] chore: release 0.4.2-SNAPSHOT (#135) :robot: I have created a release \*beep\* \*boop\* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index ee699441..0519866e 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.4.1 + 0.4.2-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index c175c9d6..196dc062 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.4.1 + 0.4.2-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.4.1 + 0.4.2-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 629da10e..4bf5cbf5 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 54c439c4..dbe8f62d 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 2e6afd37..74970f48 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.4.1 + 0.4.2-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 4d89a5fe..c83dafd3 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.1 + 0.4.2-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 1f40cccf..534c5b37 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.1 + 0.4.2-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.1 + 0.4.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 528b099e..5492b8e6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.4.1:0.4.1 -grpc-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.1 -grpc-google-cloud-binary-authorization-v1:0.4.1:0.4.1 -proto-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.1 -proto-google-cloud-binary-authorization-v1:0.4.1:0.4.1 +google-cloud-binary-authorization:0.4.1:0.4.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:0.4.1:0.4.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1:0.4.1:0.4.2-SNAPSHOT From c754214a4b76d665a673531bbf0b3a4319db70df Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 20:30:25 +0000 Subject: [PATCH 038/203] chore(owlbot-java): disable re-writing clirr file in owlbot java post-processor (#1320) (#139) --- .github/.OwlBot.lock.yaml | 2 +- README.md | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 731a0eb4..20c6ee3c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:491a007c6bd6e77f9e9b1bebcd6cdf08a4a4ef2c228c123d9696845204cb685d + digest: sha256:efbfc5e9ff713005a037941f8ebcc0c69cc630e3ad934675ee26868705a30897 diff --git a/README.md b/README.md index 3b735cbb..99bb2971 100644 --- a/README.md +++ b/README.md @@ -22,20 +22,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:0.4.0' +implementation 'com.google.cloud:google-cloud-binary-authorization:0.4.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.4.0" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.4.1" ``` ## Authentication From 43f30ac7dc341c6819d3601d0e9995b09ef9683c Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Mon, 10 Jan 2022 19:22:23 -0500 Subject: [PATCH 039/203] chore: change name to api_shortname in .repo-metadata.json (#140) --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 0e41ddf7..4821791c 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,5 +1,5 @@ { - "name": "binary-authorization", + "api_shortname": "binary-authorization", "name_pretty": "Binary Authorization", "product_documentation": "https://cloud.google.com/binary-authorization/docs", "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", From d1600653542e493bc4f0aa272194b66e2b51ced9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 11 Jan 2022 19:00:19 +0000 Subject: [PATCH 040/203] chore(java): update variable name to api_shortname in README template (#1323) (#141) --- .github/.OwlBot.lock.yaml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 20c6ee3c..dddb13b8 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:efbfc5e9ff713005a037941f8ebcc0c69cc630e3ad934675ee26868705a30897 + digest: sha256:7f737996c88586c499f7b0c25294c760f9f5eec092289a0e08d2d3f42a069ebb diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d7580dac..f6398fb9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -21,7 +21,7 @@ If you are still having issues, please include as much information as possible: General, Core, and Other are also allowed as types 2. OS type and version: 3. Java version: -4. binary-authorization version(s): +4. version(s): #### Steps to reproduce From 14b6392d9362fb173fe0846c1a8521acdf609275 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 12 Jan 2022 23:26:25 +0100 Subject: [PATCH 041/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.5 (#142) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.4` -> `1.2.5` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/compatibility-slim/1.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.5/confidence-slim/1.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.5`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​125-httpsgithubcomgoogleapisjava-shared-configcomparev124v125-2022-01-11) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.4...v1.2.5)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 0519866e..b4051555 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.4 + 1.2.5 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 74970f48..d6ce4be9 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.4 + 1.2.5 From 96bf148f74cba2aece2befdb76758b2a2a0fa54d Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Thu, 13 Jan 2022 17:54:19 -0500 Subject: [PATCH 042/203] chore: update release-level in .repo-metadata.json (#145) --- .repo-metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 4821791c..1e7d4b77 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/binary-authorization/docs", "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-binary-authorization/latest/history", - "release_level": "beta", + "release_level": "preview", "transport": "grpc", "language": "java", "repo": "googleapis/java-binary-authorization", From 9f6aca740e7994c2b9873b8e53b2ae8b35eb2ca3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 17 Jan 2022 19:16:30 +0100 Subject: [PATCH 043/203] chore(deps): update dependency com.google.cloud:google-cloud-binary-authorization to v0.4.1 (#136) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-binary-authorization](https://togithub.com/googleapis/java-binary-authorization) | `0.4.0` -> `0.4.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.4.1/compatibility-slim/0.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-binary-authorization/0.4.1/confidence-slim/0.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-binary-authorization ### [`v0.4.1`](https://togithub.com/googleapis/java-binary-authorization/blob/HEAD/CHANGELOG.md#​041-httpswwwgithubcomgoogleapisjava-binary-authorizationcomparev040v041-2022-01-07) [Compare Source](https://togithub.com/googleapis/java-binary-authorization/compare/v0.4.0...v0.4.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- samples/snippets/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index ee13f8a0..d30bdd3d 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -29,7 +29,7 @@ com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1 diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index f79e2d60..31732ffd 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1 diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml index a214029a..d9768700 100644 --- a/samples/snippets/pom.xml +++ b/samples/snippets/pom.xml @@ -28,7 +28,7 @@ com.google.cloud google-cloud-binary-authorization - 0.4.0 + 0.4.1 From 60610647878c3ed6cbb2131bf493d0610e34eba6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 21:16:35 +0000 Subject: [PATCH 044/203] chore(java): update release_type choices to stable and preview (#1331) (#146) --- .github/.OwlBot.lock.yaml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dddb13b8..dcdda8c6 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7f737996c88586c499f7b0c25294c760f9f5eec092289a0e08d2d3f42a069ebb + digest: sha256:9669c169d0582f13d6b2d319a43a78fc49f296a883aa48519bd0e5c7d34087c4 diff --git a/README.md b/README.md index 99bb2971..ed51045c 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java8-win.html [kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java11.svg [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java11.html -[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[stability-image]: https://img.shields.io/badge/stability-preview-yellow [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-binary-authorization.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-binary-authorization&core=gav [authentication]: https://github.com/googleapis/google-cloud-java#authentication From f64e75577b3cb30db219ee19134e7d02abf0ecc3 Mon Sep 17 00:00:00 2001 From: Neenu Shaji Date: Tue, 18 Jan 2022 12:40:16 -0500 Subject: [PATCH 045/203] feat: promote to GA (#147) Release-As: 1.0.0 --- .repo-metadata.json | 2 +- README.md | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.repo-metadata.json b/.repo-metadata.json index 1e7d4b77..074c7a04 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -4,7 +4,7 @@ "product_documentation": "https://cloud.google.com/binary-authorization/docs", "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-binary-authorization/latest/history", - "release_level": "preview", + "release_level": "stable", "transport": "grpc", "language": "java", "repo": "googleapis/java-binary-authorization", diff --git a/README.md b/README.md index ed51045c..76a247ed 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,6 @@ Java idiomatic client for [Binary Authorization][product-docs]. - [Product Documentation][product-docs] - [Client Library Documentation][javadocs] -> Note: This client is a work-in-progress, and may occasionally -> make backwards-incompatible changes. - ## Quickstart @@ -132,9 +129,6 @@ and on [google-cloud-java][g-c-j]. This library follows [Semantic Versioning](http://semver.org/). -It is currently in major version zero (``0.y.z``), which means that anything may change at any time -and the public API should not be considered stable. - ## Contributing @@ -175,7 +169,7 @@ Java is a registered trademark of Oracle and/or its affiliates. [kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java8-win.html [kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java11.svg [kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-binary-authorization/java11.html -[stability-image]: https://img.shields.io/badge/stability-preview-yellow +[stability-image]: https://img.shields.io/badge/stability-stable-green [maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-binary-authorization.svg [maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-binary-authorization&core=gav [authentication]: https://github.com/googleapis/google-cloud-java#authentication From d520be3bbc91b04e3186cc40e8130a8b722b225f Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 18 Jan 2022 20:10:13 +0100 Subject: [PATCH 046/203] build(deps): update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.3.0 (#137) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.codehaus.mojo:build-helper-maven-plugin](http://www.mojohaus.org/build-helper-maven-plugin/) ([source](https://togithub.com/mojohaus/build-helper-maven-plugin)) | `3.2.0` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/compatibility-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.codehaus.mojo:build-helper-maven-plugin/3.3.0/confidence-slim/3.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/install-without-bom/pom.xml | 2 +- samples/snapshot/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml index d30bdd3d..702955ca 100644 --- a/samples/install-without-bom/pom.xml +++ b/samples/install-without-bom/pom.xml @@ -53,7 +53,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml index 31732ffd..7d4c4c04 100644 --- a/samples/snapshot/pom.xml +++ b/samples/snapshot/pom.xml @@ -52,7 +52,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.2.0 + 3.3.0 add-snippets-source From b6c7913f1ba5fc47b323aa5755abee4854ae0b8a Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Wed, 19 Jan 2022 07:54:43 -0800 Subject: [PATCH 047/203] chore: Update .repo-metadata.json (#144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update .repo-metadata.json * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Update .repo-metadata.json * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot Co-authored-by: Dina Graves Portman --- .github/CODEOWNERS | 4 +++- .repo-metadata.json | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 30fdb7b9..5f9903d5 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -4,7 +4,9 @@ # For syntax help see: # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax -* @googleapis/yoshi-java +# The @googleapis/aap-dpes is the default owner for changes in this repo +* @googleapis/yoshi-java @googleapis/aap-dpes +**/*.java @googleapis/aap-dpes # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.repo-metadata.json b/.repo-metadata.json index 074c7a04..7516b2d5 100644 --- a/.repo-metadata.json +++ b/.repo-metadata.json @@ -1,5 +1,5 @@ { - "api_shortname": "binary-authorization", + "api_shortname": "binaryauthorization", "name_pretty": "Binary Authorization", "product_documentation": "https://cloud.google.com/binary-authorization/docs", "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", @@ -12,5 +12,6 @@ "distribution_name": "com.google.cloud:google-cloud-binary-authorization", "api_id": "binary-authorization.googleapis.com", "requires_billing": true, + "codeowner_team": "@googleapis/aap-dpes", "library_type": "GAPIC_AUTO" } From fa08d7f0862d9252941236c4ca74e47f4fba8856 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 21 Jan 2022 21:36:19 +0100 Subject: [PATCH 048/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.6 (#149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.5` -> `1.2.6` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/compatibility-slim/1.2.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.6/confidence-slim/1.2.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.6`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​126-httpsgithubcomgoogleapisjava-shared-configcomparev125v126-2022-01-19) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.5...v1.2.6)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index b4051555..a6776f49 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.5 + 1.2.6 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index d6ce4be9..a2e249be 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.5 + 1.2.6 From 1d0e567bee55a6eff0daa831449e3f090a22981b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 26 Jan 2022 00:22:25 +0100 Subject: [PATCH 049/203] deps: update dependency io.grafeas:grafeas to v2.2.0 (#138) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.1.3` -> `2.2.0` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.0/compatibility-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.0/confidence-slim/2.1.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.2.0`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​220-httpswwwgithubcomgoogleapisjava-grafeascomparev213v220-2022-01-07) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.1.3...v2.2.0) ##### Features - Updating the grafeas protos to include compliance and intoto attestation protos ([#​428](https://www.togithub.com/googleapis/java-grafeas/issues/428)) ([2bcd97c](https://www.github.com/googleapis/java-grafeas/commit/2bcd97cfdb56199139fe0d5bd823b8810e48db86)) ##### Bug Fixes - **java:** add -ntp flag to native image testing command ([#​426](https://www.togithub.com/googleapis/java-grafeas/issues/426)) ([cef2f85](https://www.github.com/googleapis/java-grafeas/commit/cef2f854f69c48cde5bad7f09845cef344497d64)) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#​437](https://www.togithub.com/googleapis/java-grafeas/issues/437)) ([edb2bfa](https://www.github.com/googleapis/java-grafeas/commit/edb2bfa780ca0c5de0d3dc030a299edb96078ab0)) ##### [2.1.3](https://www.github.com/googleapis/java-grafeas/compare/v2.1.2...v2.1.3) (2021-12-03) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#​423](https://www.togithub.com/googleapis/java-grafeas/issues/423)) ([5f8c0b2](https://www.github.com/googleapis/java-grafeas/commit/5f8c0b295f1fa2989decb08a3b09c21436172a13)) - update dependency com.puppycrawl.tools:checkstyle to v9.2 ([#​422](https://www.togithub.com/googleapis/java-grafeas/issues/422)) ([f287083](https://www.github.com/googleapis/java-grafeas/commit/f28708355381e8d1e0a99e73052c189fd04f1d4f)) ##### [2.1.2](https://www.github.com/googleapis/java-grafeas/compare/v2.1.1...v2.1.2) (2021-11-15) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#​417](https://www.togithub.com/googleapis/java-grafeas/issues/417)) ([0be37eb](https://www.github.com/googleapis/java-grafeas/commit/0be37eb1c194ec49a36cf799799213949d010dfb)) ##### [2.1.1](https://www.github.com/googleapis/java-grafeas/compare/v2.1.0...v2.1.1) (2021-11-03) ##### Dependencies - update dependency com.puppycrawl.tools:checkstyle to v9.1 ([#​409](https://www.togithub.com/googleapis/java-grafeas/issues/409)) ([d648440](https://www.github.com/googleapis/java-grafeas/commit/d64844048df0d33ff30768ac165b4300beffd53c))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a2e249be..79951cc5 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.1.3 + 2.2.0 From a77d7434d96d7f710d29b507b8fd4a3c61c6bf58 Mon Sep 17 00:00:00 2001 From: Averi Kitsch Date: Thu, 27 Jan 2022 11:53:51 -0800 Subject: [PATCH 050/203] chore: remove dep dashboard (#150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: remove dep dashboard * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot From 010fea6e7fda31e4c9bc5642560340831337d3ae Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Feb 2022 04:50:49 +0100 Subject: [PATCH 051/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 (#154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.6.0` -> `2.7.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.7.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.7.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.7.0/compatibility-slim/2.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.7.0/confidence-slim/2.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.7.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​270-httpsgithubcomgoogleapisjava-shared-dependenciescomparev260v270-2022-01-28) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.6.0...v2.7.0) ##### Dependencies - update dependency com.fasterxml.jackson:jackson-bom to v2.13.1 ([#​555](https://togithub.com/googleapis/java-shared-dependencies/issues/555)) ([67b5663](https://togithub.com/googleapis/java-shared-dependencies/commit/67b56635509215fd132b2ffbcaed995a6de93879)) - update dependency com.google.api-client:google-api-client-bom to v1.33.1 ([#​580](https://togithub.com/googleapis/java-shared-dependencies/issues/580)) ([895dba2](https://togithub.com/googleapis/java-shared-dependencies/commit/895dba2afef6c295b0e21a4ccd27feee1b6af8e2)) - update dependency com.google.api:api-common to v2.1.3 ([#​587](https://togithub.com/googleapis/java-shared-dependencies/issues/587)) ([5dbbce8](https://togithub.com/googleapis/java-shared-dependencies/commit/5dbbce80baa045818757912e6db4f222c12b75f6)) - update dependency com.google.auth:google-auth-library-bom to v1.4.0 ([#​578](https://togithub.com/googleapis/java-shared-dependencies/issues/578)) ([c274c62](https://togithub.com/googleapis/java-shared-dependencies/commit/c274c62905192bcc48c82104bf50cbeaa1894c2b)) - update dependency com.google.errorprone:error_prone_annotations to v2.11.0 ([#​582](https://togithub.com/googleapis/java-shared-dependencies/issues/582)) ([314da38](https://togithub.com/googleapis/java-shared-dependencies/commit/314da38c9f12cf425b5d1be8297e9f2a78d13948)) - update dependency com.google.http-client:google-http-client-bom to v1.41.2 ([#​579](https://togithub.com/googleapis/java-shared-dependencies/issues/579)) ([c8df06d](https://togithub.com/googleapis/java-shared-dependencies/commit/c8df06ddb3f4a975e928bbdd9dfae293e81efa39)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.0 ([#​576](https://togithub.com/googleapis/java-shared-dependencies/issues/576)) ([3315988](https://togithub.com/googleapis/java-shared-dependencies/commit/3315988059ca0223f078b0f760960674bfa8c04a)) - update dependency com.google.protobuf:protobuf-bom to v3.19.3 ([#​571](https://togithub.com/googleapis/java-shared-dependencies/issues/571)) ([c1931e1](https://togithub.com/googleapis/java-shared-dependencies/commit/c1931e1c4611ca3d1e2afac1c9e983cf1ec4a7de)) - update dependency io.grpc:grpc-bom to v1.44.0 ([#​586](https://togithub.com/googleapis/java-shared-dependencies/issues/586)) ([52c47b7](https://togithub.com/googleapis/java-shared-dependencies/commit/52c47b7425af438ba1a82dac87f9002353a6a87a)) - update dependency org.checkerframework:checker-qual to v3.21.1 ([#​554](https://togithub.com/googleapis/java-shared-dependencies/issues/554)) ([81bbb91](https://togithub.com/googleapis/java-shared-dependencies/commit/81bbb91774ab67161371bfd0dfd143de89dee4c9)) - update gax.version to v2.11.0 ([#​581](https://togithub.com/googleapis/java-shared-dependencies/issues/581)) ([1899612](https://togithub.com/googleapis/java-shared-dependencies/commit/189961226f84cdd4e283780d2c7d4a4dffc3e00c)) - update gax.version to v2.9.0 ([#​573](https://togithub.com/googleapis/java-shared-dependencies/issues/573)) ([ee5e38e](https://togithub.com/googleapis/java-shared-dependencies/commit/ee5e38efea574eeb2b5803192da98ba1ce1c8e6e)) - update google.common-protos.version to v2.7.2 ([#​588](https://togithub.com/googleapis/java-shared-dependencies/issues/588)) ([caac0e6](https://togithub.com/googleapis/java-shared-dependencies/commit/caac0e68e336b801becb6322b5b81fce1824ad8a)) - update google.core.version to v2.4.0 ([#​589](https://togithub.com/googleapis/java-shared-dependencies/issues/589)) ([6a292e3](https://togithub.com/googleapis/java-shared-dependencies/commit/6a292e3530a06d6b228f3154ed4e979ef68d7aeb)) - update iam.version to v1.2.1 ([#​569](https://togithub.com/googleapis/java-shared-dependencies/issues/569)) ([62dd270](https://togithub.com/googleapis/java-shared-dependencies/commit/62dd2705b257c4bb539bfe619234f38d0e13b138)) - update opencensus.version to v0.30.0 ([#​552](https://togithub.com/googleapis/java-shared-dependencies/issues/552)) ([ebae62e](https://togithub.com/googleapis/java-shared-dependencies/commit/ebae62eca75234db4fd571f42b8ed0f6ce1bd1f7)) - update opencensus.version to v0.31.0 ([#​585](https://togithub.com/googleapis/java-shared-dependencies/issues/585)) ([021b066](https://togithub.com/googleapis/java-shared-dependencies/commit/021b066a833af1629c89fcca593d16b9786ee0bf))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 79951cc5..94b2afcc 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.6.0 + 2.7.0 pom import From 6ef4a2ca0a4673ae5b0788d28e45bafe6d361803 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 2 Feb 2022 04:58:56 +0000 Subject: [PATCH 052/203] deps(java): update actions/github-script action to v5 (#1339) (#151) --- .github/.OwlBot.lock.yaml | 15 ++++++++++++++- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dcdda8c6..be3b9bde 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,16 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:9669c169d0582f13d6b2d319a43a78fc49f296a883aa48519bd0e5c7d34087c4 + digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 7513acae..c5132427 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 9b4fd4d8..59c7cadd 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v3 + - uses: actions/github-script@v5 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true From da35c2b11a293f62b675feebddf93d85b808d0f8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 19:48:36 +0000 Subject: [PATCH 053/203] chore: add kokoro config to run nightly integration test on java11.0.14 (#1347) (#155) --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/nightly/java11-integration.cfg | 37 ++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .kokoro/nightly/java11-integration.cfg diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index be3b9bde..8807efca 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7062473f423f339256346ddbee3d81fb1de6b784fabc2a4d959d7df2c720e375 + digest: sha256:7c853edc4136ae8f19f9d46d4569d38de2e446db2eea057f32e412bdba255846 diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg new file mode 100644 index 00000000..58049cc3 --- /dev/null +++ b/.kokoro/nightly/java11-integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-public-resources/java11014" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_FLAKYBOT" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} From f35f619e35011ef04224833ba529853ad0aa0a58 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 3 Feb 2022 21:00:38 +0000 Subject: [PATCH 054/203] chore(main): release 1.0.0 (#148) :robot: I have created a release *beep* *boop* --- ## [1.0.0](https://github.com/googleapis/java-binary-authorization/compare/v0.4.1...v1.0.0) (2022-02-03) ### Features * promote to GA ([#147](https://github.com/googleapis/java-binary-authorization/issues/147)) ([f64e755](https://github.com/googleapis/java-binary-authorization/commit/f64e75577b3cb30db219ee19134e7d02abf0ecc3)) ### Dependencies * **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-binary-authorization/issues/1339)) ([#151](https://github.com/googleapis/java-binary-authorization/issues/151)) ([6ef4a2c](https://github.com/googleapis/java-binary-authorization/commit/6ef4a2ca0a4673ae5b0788d28e45bafe6d361803)) * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#154](https://github.com/googleapis/java-binary-authorization/issues/154)) ([010fea6](https://github.com/googleapis/java-binary-authorization/commit/010fea6e7fda31e4c9bc5642560340831337d3ae)) * update dependency io.grafeas:grafeas to v2.2.0 ([#138](https://github.com/googleapis/java-binary-authorization/issues/138)) ([1d0e567](https://github.com/googleapis/java-binary-authorization/commit/1d0e567bee55a6eff0daa831449e3f090a22981b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 14 ++++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 41 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4f64ba2..a3d30819 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.0.0](https://github.com/googleapis/java-binary-authorization/compare/v0.4.1...v1.0.0) (2022-02-03) + + +### Features + +* promote to GA ([#147](https://github.com/googleapis/java-binary-authorization/issues/147)) ([f64e755](https://github.com/googleapis/java-binary-authorization/commit/f64e75577b3cb30db219ee19134e7d02abf0ecc3)) + + +### Dependencies + +* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-binary-authorization/issues/1339)) ([#151](https://github.com/googleapis/java-binary-authorization/issues/151)) ([6ef4a2c](https://github.com/googleapis/java-binary-authorization/commit/6ef4a2ca0a4673ae5b0788d28e45bafe6d361803)) +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#154](https://github.com/googleapis/java-binary-authorization/issues/154)) ([010fea6](https://github.com/googleapis/java-binary-authorization/commit/010fea6e7fda31e4c9bc5642560340831337d3ae)) +* update dependency io.grafeas:grafeas to v2.2.0 ([#138](https://github.com/googleapis/java-binary-authorization/issues/138)) ([1d0e567](https://github.com/googleapis/java-binary-authorization/commit/1d0e567bee55a6eff0daa831449e3f090a22981b)) + ### [0.4.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.4.0...v0.4.1) (2022-01-07) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index a6776f49..78e9593b 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 0.4.2-SNAPSHOT + 1.0.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.2-SNAPSHOT + 1.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 196dc062..96c806b1 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 0.4.2-SNAPSHOT + 1.0.0 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 0.4.2-SNAPSHOT + 1.0.0 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 4bf5cbf5..72322eaf 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.2-SNAPSHOT + 1.0.0 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index dbe8f62d..b9d9e652 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.2-SNAPSHOT + 1.0.0 diff --git a/pom.xml b/pom.xml index 94b2afcc..d812f0cd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 0.4.2-SNAPSHOT + 1.0.0 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 0.4.2-SNAPSHOT + 1.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index c83dafd3..607df287 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 0.4.2-SNAPSHOT + 1.0.0 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.2-SNAPSHOT + 1.0.0 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 534c5b37..bc983b89 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.4.2-SNAPSHOT + 0.5.0 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 0.4.2-SNAPSHOT + 1.0.0 diff --git a/versions.txt b/versions.txt index 5492b8e6..1df8d769 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:0.4.1:0.4.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:0.4.1:0.4.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.4.1:0.4.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1:0.4.1:0.4.2-SNAPSHOT +google-cloud-binary-authorization:1.0.0:1.0.0 +grpc-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.0 +grpc-google-cloud-binary-authorization-v1:1.0.0:1.0.0 +proto-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.0 +proto-google-cloud-binary-authorization-v1:1.0.0:1.0.0 From 20e5517788bf416ba35c19c133bc789baa626d93 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 4 Feb 2022 01:32:56 +0000 Subject: [PATCH 055/203] chore(main): release 1.0.1-SNAPSHOT (#156) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 78e9593b..09c0a203 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.0 + 1.0.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 96c806b1..78f7bdde 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.0 + 1.0.1-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.0 + 1.0.1-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 72322eaf..08e2739a 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index b9d9e652..c49b78a8 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index d812f0cd..0bad652e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.0 + 1.0.1-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 607df287..a6c5578e 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.0 + 1.0.1-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index bc983b89..d64f9371 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.0 + 0.5.1-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.0 + 1.0.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index 1df8d769..6696f451 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.0:1.0.0 -grpc-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.0 -grpc-google-cloud-binary-authorization-v1:1.0.0:1.0.0 -proto-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.0 -proto-google-cloud-binary-authorization-v1:1.0.0:1.0.0 +google-cloud-binary-authorization:1.0.0:1.0.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.0:1.0.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.0:1.0.1-SNAPSHOT From 7727e934f20eebd604c83b29e2cea4458fcbde30 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Feb 2022 22:14:39 +0000 Subject: [PATCH 056/203] chore: enable auto release in java (#1349) (#159) * chore: fix auto-release * chore: remove codecov.yml * chore: update license headers for yaml files Source-Link: https://github.com/googleapis/synthtool/commit/5b777277a01a93e7f10c9279521e807b934e78d4 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:ebc2104854c5b81c6fd72ca79400a2e20e0d510c5e0654fd1a19e5c9be160ca6 --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 15 +++++++++++++++ .github/workflows/auto-release.yaml | 19 +++++++++++++++++-- .github/workflows/ci.yaml | 15 +++++++++++++++ .github/workflows/samples.yaml | 15 +++++++++++++++ .kokoro/build.bat | 15 +++++++++++++++ README.md | 6 +++--- 7 files changed, 81 insertions(+), 6 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 8807efca..a8ddd81a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:7c853edc4136ae8f19f9d46d4569d38de2e446db2eea057f32e412bdba255846 + digest: sha256:ebc2104854c5b81c6fd72ca79400a2e20e0d510c5e0654fd1a19e5c9be160ca6 diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index c5132427..1bb18232 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-merge-readme diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 59c7cadd..2ba3082b 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: auto-release @@ -16,8 +31,8 @@ jobs: return; } - // only approve PRs like "chore: release " - if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + // only approve PRs like "chore(main): release " + if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { return; } diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 05de1f60..6b5e56aa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: push: branches: diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index c46230a7..d5d964df 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -1,3 +1,18 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Github action job to test core java library features on +# downstream client libraries before they are released. on: pull_request: name: samples diff --git a/.kokoro/build.bat b/.kokoro/build.bat index 05826ad9..cc602c9e 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,3 +1,18 @@ :: See documentation in type-shell-output.bat +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.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. +# Github action job to test core java library features on +# downstream client libraries before they are released. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/README.md b/README.md index 76a247ed..e4bff46c 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 0.4.1 + 1.0.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:0.4.1' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "0.4.1" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.0" ``` ## Authentication From eedd3c42afa0d3b161dc8fa9d03565c0e33ccb53 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Feb 2022 00:58:39 +0000 Subject: [PATCH 057/203] chore: update auto-release script to fix breaking changes in v5 (#1350) (#160) Source-Link: https://github.com/googleapis/synthtool/commit/53a58c23eb4decb3a17fab07388d42799e158b5f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/auto-release.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a8ddd81a..9786771c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:ebc2104854c5b81c6fd72ca79400a2e20e0d510c5e0654fd1a19e5c9be160ca6 + digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 2ba3082b..18e23230 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -37,7 +37,7 @@ jobs: } // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.pulls.listFiles.endpoint({ + const filesPromise = github.rest.pulls.listFiles.endpoint({ owner: context.repo.owner, repo: context.repo.repo, pull_number: context.payload.pull_request.number, @@ -69,7 +69,7 @@ jobs: return; } - const promise = github.pulls.list.endpoint({ + const promise = github.rest.pulls.list.endpoint({ owner: context.repo.owner, repo: context.repo.repo, state: 'open' @@ -86,7 +86,7 @@ jobs: } // approve release PR - await github.pulls.createReview({ + await github.rest.pulls.createReview({ owner: context.repo.owner, repo: context.repo.repo, body: 'Rubber stamped release!', @@ -95,7 +95,7 @@ jobs: }); // attach kokoro:force-run and automerge labels - await github.issues.addLabels({ + await github.rest.issues.addLabels({ owner: context.repo.owner, repo: context.repo.repo, issue_number: context.payload.pull_request.number, From 088d5c82c5411b3351772a1457904408bec496e1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Feb 2022 22:44:57 +0100 Subject: [PATCH 058/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.2.7 (#161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.6` -> `1.2.7` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.7/compatibility-slim/1.2.6)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.2.7/confidence-slim/1.2.6)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.2.7`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​127-httpsgithubcomgoogleapisjava-shared-configcomparev126v127-2022-02-04) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.6...v1.2.7)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 09c0a203..5d06ffe6 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.6 + 1.2.7 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 0bad652e..6749fee4 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.6 + 1.2.7 From 8957140a8da95094b9572de9a3d7a712eb07f974 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 11 Feb 2022 22:13:02 +0100 Subject: [PATCH 059/203] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.3.2 (#162) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) | `3.3.1` -> `3.3.2` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/compatibility-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.3.2/confidence-slim/3.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 6749fee4..aa84adbd 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.1 + 3.3.2 html From ea8ee5c3c26a1c2558c2d7d2d414a60686e39c8a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 11 Feb 2022 22:54:59 +0100 Subject: [PATCH 060/203] deps: update actions/github-script action to v6 (#163) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/github-script](https://togithub.com/actions/github-script) | action | major | `v5` -> `v6` | --- ### Release Notes
actions/github-script ### [`v6`](https://togithub.com/actions/github-script/compare/v5...v6) [Compare Source](https://togithub.com/actions/github-script/compare/v5...v6)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 2c8dfa4c2c2194b517f17122f46695d9805c7738 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 22:25:10 +0000 Subject: [PATCH 061/203] chore(main): release 1.0.1 (#164) :robot: I have created a release *beep* *boop* --- ### [1.0.1](https://github.com/googleapis/java-binary-authorization/compare/v1.0.0...v1.0.1) (2022-02-11) ### Dependencies * update actions/github-script action to v6 ([#163](https://github.com/googleapis/java-binary-authorization/issues/163)) ([ea8ee5c](https://github.com/googleapis/java-binary-authorization/commit/ea8ee5c3c26a1c2558c2d7d2d414a60686e39c8a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a3d30819..c3b13474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.1](https://github.com/googleapis/java-binary-authorization/compare/v1.0.0...v1.0.1) (2022-02-11) + + +### Dependencies + +* update actions/github-script action to v6 ([#163](https://github.com/googleapis/java-binary-authorization/issues/163)) ([ea8ee5c](https://github.com/googleapis/java-binary-authorization/commit/ea8ee5c3c26a1c2558c2d7d2d414a60686e39c8a)) + ## [1.0.0](https://github.com/googleapis/java-binary-authorization/compare/v0.4.1...v1.0.0) (2022-02-03) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 5d06ffe6..bf9bf728 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.1-SNAPSHOT + 1.0.1 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.1-SNAPSHOT + 1.0.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 78f7bdde..ab6e861e 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.1-SNAPSHOT + 1.0.1 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.1-SNAPSHOT + 1.0.1 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 08e2739a..b09241a6 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1-SNAPSHOT + 1.0.1 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index c49b78a8..30e69a3f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1-SNAPSHOT + 1.0.1 diff --git a/pom.xml b/pom.xml index aa84adbd..4f540ef6 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.1-SNAPSHOT + 1.0.1 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.1-SNAPSHOT + 1.0.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index a6c5578e..5d55e0d3 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1-SNAPSHOT + 1.0.1 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1-SNAPSHOT + 1.0.1 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index d64f9371..acdac134 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1-SNAPSHOT + 0.5.1 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1-SNAPSHOT + 1.0.1 diff --git a/versions.txt b/versions.txt index 6696f451..5b7f3303 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.0:1.0.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.0:1.0.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.0:0.5.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.0:1.0.1-SNAPSHOT +google-cloud-binary-authorization:1.0.1:1.0.1 +grpc-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.1 +grpc-google-cloud-binary-authorization-v1:1.0.1:1.0.1 +proto-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.1 +proto-google-cloud-binary-authorization-v1:1.0.1:1.0.1 From 308b77b4a59550652740d029b54e84346fe62b13 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 11 Feb 2022 23:56:57 +0000 Subject: [PATCH 062/203] chore(main): release 1.0.2-SNAPSHOT (#165) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index bf9bf728..f4f3ee81 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.1 + 1.0.2-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.1 + 1.0.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index ab6e861e..18400ae5 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.1 + 1.0.2-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.1 + 1.0.2-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index b09241a6..f8acc0b4 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1 + 1.0.2-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 30e69a3f..18ac047e 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1 + 1.0.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 4f540ef6..b05047ae 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.1 + 1.0.2-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.1 + 1.0.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 5d55e0d3..e8fb4bf2 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.1 + 1.0.2-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1 + 1.0.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index acdac134..1811e021 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.1 + 0.5.2-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.1 + 1.0.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 5b7f3303..6b36f402 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.1:1.0.1 -grpc-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.1 -grpc-google-cloud-binary-authorization-v1:1.0.1:1.0.1 -proto-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.1 -proto-google-cloud-binary-authorization-v1:1.0.1:1.0.1 +google-cloud-binary-authorization:1.0.1:1.0.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.1:1.0.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.1:1.0.2-SNAPSHOT From 246b800d432f9592dc55efcc63167e8a88f7d3c9 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 14 Feb 2022 22:45:20 +0100 Subject: [PATCH 063/203] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.9 (#166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | org.sonatype.plugins:nexus-staging-maven-plugin | `1.6.8` -> `1.6.9` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/compatibility-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.9/confidence-slim/1.6.8)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- samples/pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e4bff46c..3119a30c 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.0 + 1.0.1 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.0' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.0" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.1" ``` ## Authentication diff --git a/samples/pom.xml b/samples/pom.xml index a599061d..b0f5c799 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.8 + 1.6.9 true From e918a2165cd88231a4bad9ef570e93b030ede0b5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Feb 2022 17:50:51 +0100 Subject: [PATCH 064/203] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.10 (#167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.9` -> `1.6.10` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/compatibility-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.10/confidence-slim/1.6.9)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.10`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.9...release-1.6.10)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index b0f5c799..41367e97 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.9 + 1.6.10 true From cdf259236967771091b058e98e410f113c5e07fa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Sat, 19 Feb 2022 01:19:04 +0100 Subject: [PATCH 065/203] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.11 (#168) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.10` -> `1.6.11` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/compatibility-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.11/confidence-slim/1.6.10)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.11`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.10...release-1.6.11)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index 41367e97..6f16082c 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.10 + 1.6.11 true From f35a0e7c666544fbc2183679b1f95e0139de758e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 25 Feb 2022 22:16:30 +0000 Subject: [PATCH 066/203] ci: pull request template includes sample format (#1357) (#172) Source-Link: https://github.com/googleapis/synthtool/commit/e122cb03ea37652946651346736d99b9dcc4311f Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 --- .github/.OwlBot.lock.yaml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9786771c..9351fdfb 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:3c950ed12391ebaffd1ee66d0374766a1c50144ebe6a7a0042300b2e6bb5856b + digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index d392928e..5cd38b14 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -5,3 +5,6 @@ Thank you for opening a Pull Request! Before submitting your PR, there are a few - [ ] Appropriate docs were updated (if necessary) Fixes # ☕️ + +If you write sample code, please follow the [samples format]( +https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). From d4bce7eabf6f25a4d9fe044b1ffd1d2ed7b03434 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 28 Feb 2022 22:06:29 +0100 Subject: [PATCH 067/203] deps: update dependency io.grafeas:grafeas to v2.2.1 (#170) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.2.0` -> `2.2.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.1/compatibility-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.1/confidence-slim/2.2.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.2.1`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​221-httpsgithubcomgoogleapisjava-grafeascomparev220v221-2022-02-22) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.2.0...v2.2.1)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b05047ae..05602bb2 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.2.0 + 2.2.1 From c2b4c8e1ae4dcca04f045b00fd005e4d27ab6b09 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 28 Feb 2022 22:26:16 +0100 Subject: [PATCH 068/203] deps: update actions/setup-java action to v3 (#171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/setup-java](https://togithub.com/actions/setup-java) | action | major | `v1` -> `v3` | | [actions/setup-java](https://togithub.com/actions/setup-java) | action | major | `v2` -> `v3` | --- ### Release Notes
actions/setup-java ### [`v3`](https://togithub.com/actions/setup-java/compare/v2...v3) [Compare Source](https://togithub.com/actions/setup-java/compare/v2...v3) ### [`v2`](https://togithub.com/actions/setup-java/compare/v1...v2) [Compare Source](https://togithub.com/actions/setup-java/compare/v1...v2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 42c14658690588f0211e99d677084e0ed0808cee Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 21:32:32 +0000 Subject: [PATCH 069/203] chore(main): release 1.0.2 (#173) :robot: I have created a release *beep* *boop* --- ### [1.0.2](https://github.com/googleapis/java-binary-authorization/compare/v1.0.1...v1.0.2) (2022-02-28) ### Dependencies * update actions/setup-java action to v3 ([#171](https://github.com/googleapis/java-binary-authorization/issues/171)) ([c2b4c8e](https://github.com/googleapis/java-binary-authorization/commit/c2b4c8e1ae4dcca04f045b00fd005e4d27ab6b09)) * update dependency io.grafeas:grafeas to v2.2.1 ([#170](https://github.com/googleapis/java-binary-authorization/issues/170)) ([d4bce7e](https://github.com/googleapis/java-binary-authorization/commit/d4bce7eabf6f25a4d9fe044b1ffd1d2ed7b03434)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 8 ++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 35 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3b13474..6de8293f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +### [1.0.2](https://github.com/googleapis/java-binary-authorization/compare/v1.0.1...v1.0.2) (2022-02-28) + + +### Dependencies + +* update actions/setup-java action to v3 ([#171](https://github.com/googleapis/java-binary-authorization/issues/171)) ([c2b4c8e](https://github.com/googleapis/java-binary-authorization/commit/c2b4c8e1ae4dcca04f045b00fd005e4d27ab6b09)) +* update dependency io.grafeas:grafeas to v2.2.1 ([#170](https://github.com/googleapis/java-binary-authorization/issues/170)) ([d4bce7e](https://github.com/googleapis/java-binary-authorization/commit/d4bce7eabf6f25a4d9fe044b1ffd1d2ed7b03434)) + ### [1.0.1](https://github.com/googleapis/java-binary-authorization/compare/v1.0.0...v1.0.1) (2022-02-11) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index f4f3ee81..202e3f09 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.2-SNAPSHOT + 1.0.2 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.2-SNAPSHOT + 1.0.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 18400ae5..f8dfbdb1 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.2-SNAPSHOT + 1.0.2 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.2-SNAPSHOT + 1.0.2 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f8acc0b4..f3958bff 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 18ac047e..15f1703f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/pom.xml b/pom.xml index 05602bb2..2d67d069 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.2-SNAPSHOT + 1.0.2 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.2-SNAPSHOT + 1.0.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index e8fb4bf2..ff087a46 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2-SNAPSHOT + 1.0.2 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 1811e021..af854940 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2-SNAPSHOT + 0.5.2 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2-SNAPSHOT + 1.0.2 diff --git a/versions.txt b/versions.txt index 6b36f402..152d3063 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.1:1.0.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.1:1.0.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.1:0.5.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.1:1.0.2-SNAPSHOT +google-cloud-binary-authorization:1.0.2:1.0.2 +grpc-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.2 +grpc-google-cloud-binary-authorization-v1:1.0.2:1.0.2 +proto-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.2 +proto-google-cloud-binary-authorization-v1:1.0.2:1.0.2 From e883a5ee64074a1f91b006c8fe86d7ea4229f6f6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 28 Feb 2022 21:42:17 +0000 Subject: [PATCH 070/203] chore(main): release 1.0.3-SNAPSHOT (#174) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 202e3f09..4d3c3977 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.2 + 1.0.3-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.2 + 1.0.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index f8dfbdb1..434b0543 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.2 + 1.0.3-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.2 + 1.0.3-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f3958bff..3a5282be 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2 + 1.0.3-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 15f1703f..c7cca810 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2 + 1.0.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index 2d67d069..891d7472 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.2 + 1.0.3-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.2 + 1.0.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index ff087a46..093271fe 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.2 + 1.0.3-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2 + 1.0.3-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index af854940..7543a24e 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.2 + 0.5.3-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.2 + 1.0.3-SNAPSHOT diff --git a/versions.txt b/versions.txt index 152d3063..fb40225c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.2:1.0.2 -grpc-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.2 -grpc-google-cloud-binary-authorization-v1:1.0.2:1.0.2 -proto-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.2 -proto-google-cloud-binary-authorization-v1:1.0.2:1.0.2 +google-cloud-binary-authorization:1.0.2:1.0.3-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.3-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.2:1.0.3-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.3-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.2:1.0.3-SNAPSHOT From e80ca08967972d4a58cc7d47000996f268d2776a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 03:54:16 +0100 Subject: [PATCH 071/203] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.2.1 (#158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.1.2` -> `3.2.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/compatibility-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.1/confidence-slim/3.1.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3119a30c..561af321 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.1 + 1.0.2 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.1' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.2' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.1" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.2" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 891d7472..226d773d 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.1.2 + 3.2.1 From 5d929888210309cbb57ce71e21424916f5114888 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 1 Mar 2022 18:50:17 +0100 Subject: [PATCH 072/203] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.2.2 (#175) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.2.1` -> `3.2.2` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/compatibility-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.2.2/confidence-slim/3.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 226d773d..7d8424c1 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.1 + 3.2.2 From d5bf44c0486a742065f11c4d1360dfaf040ae13f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 1 Mar 2022 22:38:20 +0000 Subject: [PATCH 073/203] chore: update github actions (#1361) (#177) * chore: update github actions * chore: update Source-Link: https://github.com/googleapis/synthtool/commit/1622741e6877d4b335b137ac7e07f7f32d4e5af7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/approve-readme.yaml | 2 +- .github/workflows/auto-release.yaml | 2 +- .github/workflows/ci.yaml | 20 ++++++++++---------- .github/workflows/samples.yaml | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 9351fdfb..53941094 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:387835a1375a0049ec44e02542c844302854c732d8291bdf8e472c0ff70a8f67 + digest: sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml index 1bb18232..f5fc7d51 100644 --- a/.github/workflows/approve-readme.yaml +++ b/.github/workflows/approve-readme.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} script: | diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml index 18e23230..7a106d00 100644 --- a/.github/workflows/auto-release.yaml +++ b/.github/workflows/auto-release.yaml @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest if: contains(github.head_ref, 'release-please') steps: - - uses: actions/github-script@v5 + - uses: actions/github-script@v6 with: github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} debug: true diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6b5e56aa..83ef7f9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -27,8 +27,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -39,8 +39,8 @@ jobs: windows: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 @@ -54,8 +54,8 @@ jobs: matrix: java: [8, 11, 17] steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: ${{matrix.java}} @@ -64,8 +64,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 11 @@ -76,8 +76,8 @@ jobs: clirr: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: distribution: zulu java-version: 8 diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index d5d964df..de737e92 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -20,8 +20,8 @@ jobs: checkstyle: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-java@v3 with: java-version: 8 - name: Run checkstyle From 6bff3c1e1b62f5f3d9b8470a5db211086e414dfa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 2 Mar 2022 19:14:23 +0100 Subject: [PATCH 074/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 (#178) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.7.0` -> `2.8.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.8.0/compatibility-slim/2.7.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.8.0/confidence-slim/2.7.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.8.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​280-httpsgithubcomgoogleapisjava-shared-dependenciescomparev270v280-2022-03-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.7.0...v2.8.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.33.2 ([#​602](https://togithub.com/googleapis/java-shared-dependencies/issues/602)) ([85b132f](https://togithub.com/googleapis/java-shared-dependencies/commit/85b132f5830772646025b6a9fbbb970a941b86b5)) - update dependency com.google.api:api-common to v2.1.4 ([#​605](https://togithub.com/googleapis/java-shared-dependencies/issues/605)) ([ca7d49a](https://togithub.com/googleapis/java-shared-dependencies/commit/ca7d49aee26b6d90abd2afd61c20861d2307fe9c)) - update dependency com.google.auth:google-auth-library-bom to v1.5.3 ([#​614](https://togithub.com/googleapis/java-shared-dependencies/issues/614)) ([e6413f3](https://togithub.com/googleapis/java-shared-dependencies/commit/e6413f3b1be78473ace7085c344eda2d78cdf01a)) - update dependency com.google.cloud:google-cloud-core to v2.5.6 ([#​621](https://togithub.com/googleapis/java-shared-dependencies/issues/621)) ([3d5669f](https://togithub.com/googleapis/java-shared-dependencies/commit/3d5669f215689dd2df71200ffe37d5a9d385cda8)) - update dependency com.google.code.gson:gson to v2.9.0 ([#​611](https://togithub.com/googleapis/java-shared-dependencies/issues/611)) ([f59c28d](https://togithub.com/googleapis/java-shared-dependencies/commit/f59c28d8cd30ada1237f7722135ba148dce6315e)) - update dependency com.google.http-client:google-http-client-bom to v1.41.4 ([#​608](https://togithub.com/googleapis/java-shared-dependencies/issues/608)) ([f9a4f23](https://togithub.com/googleapis/java-shared-dependencies/commit/f9a4f23d3a32148ac59e53eaae6558ccbceca12c)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.1 ([#​606](https://togithub.com/googleapis/java-shared-dependencies/issues/606)) ([3882494](https://togithub.com/googleapis/java-shared-dependencies/commit/3882494770d48fcc02ed19088aa06612a8e440eb)) - update dependency com.google.protobuf:protobuf-bom to v3.19.4 ([#​593](https://togithub.com/googleapis/java-shared-dependencies/issues/593)) ([1e155bf](https://togithub.com/googleapis/java-shared-dependencies/commit/1e155bfc957bbb7e25d2e0994cdecaa81843bdc5)) - update dependency io.grpc:grpc-bom to v1.44.1 ([#​613](https://togithub.com/googleapis/java-shared-dependencies/issues/613)) ([3038a2c](https://togithub.com/googleapis/java-shared-dependencies/commit/3038a2c86cd20c91b65f2d7926eeb739147a68db)) - update dependency junit:junit to v4.13.2 ([#​607](https://togithub.com/googleapis/java-shared-dependencies/issues/607)) ([987e617](https://togithub.com/googleapis/java-shared-dependencies/commit/987e61796c7a093e005fe8832cf39275c391b2c1)) - update dependency org.checkerframework:checker-qual to v3.21.3 ([#​596](https://togithub.com/googleapis/java-shared-dependencies/issues/596)) ([ac5083c](https://togithub.com/googleapis/java-shared-dependencies/commit/ac5083cd010924dc128f041c2cdbab20166a6bf0)) - update gax.version to v2.12.2 ([#​592](https://togithub.com/googleapis/java-shared-dependencies/issues/592)) ([713ff8d](https://togithub.com/googleapis/java-shared-dependencies/commit/713ff8dd94f939c417524616bc47c771a3fbe0cf)) - update google.common-protos.version to v2.7.4 ([#​603](https://togithub.com/googleapis/java-shared-dependencies/issues/603)) ([bb9b4c7](https://togithub.com/googleapis/java-shared-dependencies/commit/bb9b4c7e39552cc73b3b9d4c826b26e8cb74459f)) - update google.core.version ([#​599](https://togithub.com/googleapis/java-shared-dependencies/issues/599)) ([327d0df](https://togithub.com/googleapis/java-shared-dependencies/commit/327d0df9b57203c0d4f426de0380770d3d7910d6)) - update iam.version to v1.2.6 ([#​598](https://togithub.com/googleapis/java-shared-dependencies/issues/598)) ([2801439](https://togithub.com/googleapis/java-shared-dependencies/commit/280143964c7c3b93a8d7f67215ba2cc74ffce761))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7d8424c1..57e79fb7 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.7.0 + 2.8.0 pom import From 8494a0689511579d1c251f2b540122b898a1c468 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:32:20 +0000 Subject: [PATCH 075/203] chore(main): release 1.0.3 (#179) :robot: I have created a release *beep* *boop* --- ### [1.0.3](https://github.com/googleapis/java-binary-authorization/compare/v1.0.2...v1.0.3) (2022-03-02) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#178](https://github.com/googleapis/java-binary-authorization/issues/178)) ([6bff3c1](https://github.com/googleapis/java-binary-authorization/commit/6bff3c1e1b62f5f3d9b8470a5db211086e414dfa)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6de8293f..7a2613b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.3](https://github.com/googleapis/java-binary-authorization/compare/v1.0.2...v1.0.3) (2022-03-02) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#178](https://github.com/googleapis/java-binary-authorization/issues/178)) ([6bff3c1](https://github.com/googleapis/java-binary-authorization/commit/6bff3c1e1b62f5f3d9b8470a5db211086e414dfa)) + ### [1.0.2](https://github.com/googleapis/java-binary-authorization/compare/v1.0.1...v1.0.2) (2022-02-28) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 4d3c3977..b69ca62c 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.3-SNAPSHOT + 1.0.3 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.3-SNAPSHOT + 1.0.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 434b0543..17cb54a6 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.3-SNAPSHOT + 1.0.3 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.3-SNAPSHOT + 1.0.3 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 3a5282be..3c44d46f 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index c7cca810..4e27585e 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/pom.xml b/pom.xml index 57e79fb7..897b0bb1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.3-SNAPSHOT + 1.0.3 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.3-SNAPSHOT + 1.0.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 093271fe..937addc6 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3-SNAPSHOT + 1.0.3 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 7543a24e..497c83e2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3-SNAPSHOT + 0.5.3 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3-SNAPSHOT + 1.0.3 diff --git a/versions.txt b/versions.txt index fb40225c..b68c2fa4 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.2:1.0.3-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.3-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.2:1.0.3-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.2:0.5.3-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.2:1.0.3-SNAPSHOT +google-cloud-binary-authorization:1.0.3:1.0.3 +grpc-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.3 +grpc-google-cloud-binary-authorization-v1:1.0.3:1.0.3 +proto-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.3 +proto-google-cloud-binary-authorization-v1:1.0.3:1.0.3 From 7bafbfe6cb76e0d82eab9be197a90de95d3abde7 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 18:50:32 +0000 Subject: [PATCH 076/203] chore(main): release 1.0.4-SNAPSHOT (#180) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index b69ca62c..676adf04 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.3 + 1.0.4-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.3 + 1.0.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 17cb54a6..23a3e74d 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.3 + 1.0.4-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.3 + 1.0.4-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 3c44d46f..ad3cac94 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3 + 1.0.4-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 4e27585e..168193a9 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3 + 1.0.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index 897b0bb1..abaafa5e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.3 + 1.0.4-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.3 + 1.0.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 937addc6..bb8f400f 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.3 + 1.0.4-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3 + 1.0.4-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 497c83e2..61c61fbe 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.3 + 0.5.4-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.3 + 1.0.4-SNAPSHOT diff --git a/versions.txt b/versions.txt index b68c2fa4..4ccd50bd 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.3:1.0.3 -grpc-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.3 -grpc-google-cloud-binary-authorization-v1:1.0.3:1.0.3 -proto-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.3 -proto-google-cloud-binary-authorization-v1:1.0.3:1.0.3 +google-cloud-binary-authorization:1.0.3:1.0.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.3:1.0.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.3:1.0.4-SNAPSHOT From 96efc515137691f9e9f6b1fef22813d8f96f5d97 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Mar 2022 17:26:15 +0000 Subject: [PATCH 077/203] chore: fix license header in build.bat (#1363) (#181) * chore: fix license header in build.bat * chore: add disctribution field for setup-java action Source-Link: https://github.com/googleapis/synthtool/commit/4fea5f40a9075f3ba205ede0b453010cf080e194 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e --- .github/.OwlBot.lock.yaml | 2 +- .github/workflows/samples.yaml | 1 + .kokoro/build.bat | 30 +++++++++++++++--------------- README.md | 6 +++--- 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 53941094..3473042c 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:e3746f84955528d0fe24bf2e4df89875d6ce5a036af01b9c326d61a38838523a + digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml index de737e92..912ed8b2 100644 --- a/.github/workflows/samples.yaml +++ b/.github/workflows/samples.yaml @@ -23,6 +23,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: + distribution: zulu java-version: 8 - name: Run checkstyle run: mvn -P lint --quiet --batch-mode checkstyle:check diff --git a/.kokoro/build.bat b/.kokoro/build.bat index cc602c9e..067cf4a4 100644 --- a/.kokoro/build.bat +++ b/.kokoro/build.bat @@ -1,18 +1,18 @@ +:: Copyright 2022 Google LLC +:: +:: Licensed under the Apache License, Version 2.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. +:: Github action job to test core java library features on +:: downstream client libraries before they are released. :: See documentation in type-shell-output.bat -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# Github action job to test core java library features on -# downstream client libraries before they are released. "C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/README.md b/README.md index 561af321..1bb8ea27 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.2 + 1.0.3 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.2' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.3' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.2" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.3" ``` ## Authentication From 911226531c9a9e38dc5cc8f6013d2b2eff618ae6 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 02:42:25 +0000 Subject: [PATCH 078/203] chore: update java template (#1367) (#182) * chore: update java template * chore: fix tests * chore: fix tests * chore: update project Source-Link: https://github.com/googleapis/synthtool/commit/1155a97fed1c195d10ad406d483bc8ac2507f1d7 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:b0b1c1c89570e229b1026372a2b8989ba31495007055b8d30178b7648503eefa --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/nightly/integration.cfg | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 3473042c..426cf83e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:df8d7b2cc0dbc65871e7edd86601901a0612b272fa3f7f0eb590c5c53aa5f92e + digest: sha256:b0b1c1c89570e229b1026372a2b8989ba31495007055b8d30178b7648503eefa diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index e51c7b4c..a2907a25 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -13,12 +13,12 @@ env_vars: { # TODO: remove this after we've migrated all tests and scripts env_vars: { key: "GCLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" + value: "java-docs-samples-testing" } env_vars: { From 6b442faa0b0e565094885cce27dec91fa2c65633 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Mar 2022 04:06:32 +0100 Subject: [PATCH 079/203] deps: update dependency io.grafeas:grafeas to v2.2.2 (#183) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.2.1` -> `2.2.2` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.2/compatibility-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.2/confidence-slim/2.2.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.2.2`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​222-httpsgithubcomgoogleapisjava-grafeascomparev221v222-2022-03-07) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.2.1...v2.2.2)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index abaafa5e..c86bb9e9 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.2.1 + 2.2.2 From 9d3a4d1665c040648379ee160f05393d8bd7fd46 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 03:12:14 +0000 Subject: [PATCH 080/203] chore(main): release 1.0.4 (#184) :robot: I have created a release *beep* *boop* --- ### [1.0.4](https://github.com/googleapis/java-binary-authorization/compare/v1.0.3...v1.0.4) (2022-03-08) ### Dependencies * update dependency io.grafeas:grafeas to v2.2.2 ([#183](https://github.com/googleapis/java-binary-authorization/issues/183)) ([6b442fa](https://github.com/googleapis/java-binary-authorization/commit/6b442faa0b0e565094885cce27dec91fa2c65633)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a2613b8..6a406f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.4](https://github.com/googleapis/java-binary-authorization/compare/v1.0.3...v1.0.4) (2022-03-08) + + +### Dependencies + +* update dependency io.grafeas:grafeas to v2.2.2 ([#183](https://github.com/googleapis/java-binary-authorization/issues/183)) ([6b442fa](https://github.com/googleapis/java-binary-authorization/commit/6b442faa0b0e565094885cce27dec91fa2c65633)) + ### [1.0.3](https://github.com/googleapis/java-binary-authorization/compare/v1.0.2...v1.0.3) (2022-03-02) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 676adf04..51933754 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.4-SNAPSHOT + 1.0.4 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.4-SNAPSHOT + 1.0.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 23a3e74d..1a4d1967 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.4-SNAPSHOT + 1.0.4 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.4-SNAPSHOT + 1.0.4 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index ad3cac94..d961859f 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 168193a9..06ea168a 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/pom.xml b/pom.xml index c86bb9e9..a8483d17 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.4-SNAPSHOT + 1.0.4 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.4-SNAPSHOT + 1.0.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index bb8f400f..563e7525 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4-SNAPSHOT + 1.0.4 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 61c61fbe..b06a35d7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4-SNAPSHOT + 0.5.4 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4-SNAPSHOT + 1.0.4 diff --git a/versions.txt b/versions.txt index 4ccd50bd..8e57695f 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.3:1.0.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.3:1.0.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.3:0.5.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.3:1.0.4-SNAPSHOT +google-cloud-binary-authorization:1.0.4:1.0.4 +grpc-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.4 +grpc-google-cloud-binary-authorization-v1:1.0.4:1.0.4 +proto-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.4 +proto-google-cloud-binary-authorization-v1:1.0.4:1.0.4 From cc790233bffd94c457fddcb31b79129b7480db11 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 8 Mar 2022 03:32:13 +0000 Subject: [PATCH 081/203] chore(main): release 1.0.5-SNAPSHOT (#185) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 51933754..5e56cd80 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.4 + 1.0.5-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.4 + 1.0.5-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 1a4d1967..7ace5aa6 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.4 + 1.0.5-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.4 + 1.0.5-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index d961859f..c10beab4 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4 + 1.0.5-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 06ea168a..6bce72e9 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4 + 1.0.5-SNAPSHOT diff --git a/pom.xml b/pom.xml index a8483d17..3cbd12fe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.4 + 1.0.5-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.4 + 1.0.5-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 563e7525..a95efced 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.4 + 1.0.5-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4 + 1.0.5-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index b06a35d7..9ab66dc6 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.4 + 0.5.5-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.4 + 1.0.5-SNAPSHOT diff --git a/versions.txt b/versions.txt index 8e57695f..5fd06721 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.4:1.0.4 -grpc-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.4 -grpc-google-cloud-binary-authorization-v1:1.0.4:1.0.4 -proto-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.4 -proto-google-cloud-binary-authorization-v1:1.0.4:1.0.4 +google-cloud-binary-authorization:1.0.4:1.0.5-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.5-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.4:1.0.5-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.5-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.4:1.0.5-SNAPSHOT From 68618f7b08d6b820577370b728c427d47d1b1719 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 8 Mar 2022 21:42:31 +0100 Subject: [PATCH 082/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.3.0 (#186) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.2.7` -> `1.3.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.0/compatibility-slim/1.2.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.0/confidence-slim/1.2.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.3.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​130-httpsgithubcomgoogleapisjava-shared-configcomparev127v130-2022-03-07) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.2.7...v1.3.0) ##### Features - increase IT timeout from 20 to 60 mins ([#​440](https://togithub.com/googleapis/java-shared-config/issues/440)) ([a4427bc](https://togithub.com/googleapis/java-shared-config/commit/a4427bceebd0624e23f0b02bb24d7ed46ea4b3a6)) ##### Dependencies - update dependency com.google.cloud:native-image-support to v0.12.6 ([#​423](https://togithub.com/googleapis/java-shared-config/issues/423)) ([9a0cb79](https://togithub.com/googleapis/java-shared-config/commit/9a0cb79896d5c97dc3c5648a6740d53eb9ada673)) - update dependency com.puppycrawl.tools:checkstyle to v9.3 ([#​415](https://togithub.com/googleapis/java-shared-config/issues/415)) ([9e2d3fd](https://togithub.com/googleapis/java-shared-config/commit/9e2d3fd8bd42bc210dae5798f7d5dfe950c29f51)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.10 ([#​429](https://togithub.com/googleapis/java-shared-config/issues/429)) ([0355f29](https://togithub.com/googleapis/java-shared-config/commit/0355f2988ebcff19615b72bc65523555e4844523)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.10 ([#​430](https://togithub.com/googleapis/java-shared-config/issues/430)) ([16984d2](https://togithub.com/googleapis/java-shared-config/commit/16984d25a84aa6a8daf2a0925ea57cd0d3f0ee24)) ##### [1.2.7](https://togithub.com/googleapis/java-shared-config/compare/v1.2.6...v1.2.7) (2022-02-04) ##### Dependencies - update dependency com.google.cloud:native-image-support to v0.12.0 ([#​414](https://togithub.com/googleapis/java-shared-config/issues/414)) ([2133cc0](https://togithub.com/googleapis/java-shared-config/commit/2133cc093efd8420e352274f3eab09de819ff796)) ##### [1.2.6](https://togithub.com/googleapis/java-shared-config/compare/v1.2.5...v1.2.6) (2022-01-19) ##### Bug Fixes - library should released as 1.2.6 ([#​408](https://togithub.com/googleapis/java-shared-config/issues/408)) ([4972daa](https://togithub.com/googleapis/java-shared-config/commit/4972daa60467797566c4b043cebd322577b8eb73)) ##### [1.2.5](https://togithub.com/googleapis/java-shared-config/compare/v1.2.4...v1.2.5) (2022-01-11) ##### Bug Fixes - **java:** Enable unit tests in generated libraries for native image testing ([#​394](https://togithub.com/googleapis/java-shared-config/issues/394)) ([a453b9f](https://togithub.com/googleapis/java-shared-config/commit/a453b9f141c7555f2fd5333eb17d223410ab66eb)) ##### [1.2.4](https://www.github.com/googleapis/java-shared-config/compare/v1.2.3...v1.2.4) (2022-01-06) ##### Dependencies - revert dependency com.google.googlejavaformat:google-java-format to v1.7 ([#​391](https://www.togithub.com/googleapis/java-shared-config/issues/391)) ([17077fb](https://www.github.com/googleapis/java-shared-config/commit/17077fb1a58eef7098dc5e1e9b2c78a63c5c11e1)) ##### [1.2.3](https://www.github.com/googleapis/java-shared-config/compare/v1.2.2...v1.2.3) (2022-01-04) ##### Bug Fixes - **java:** add -ntp flag to native image testing command ([#​1299](https://www.togithub.com/googleapis/java-shared-config/issues/1299)) ([#​376](https://www.togithub.com/googleapis/java-shared-config/issues/376)) ([50e7a10](https://www.github.com/googleapis/java-shared-config/commit/50e7a10a8dca0505fd831e3dd929577d2f82b011)) - **java:** Only enable integration tests for native image testing ([#​375](https://www.togithub.com/googleapis/java-shared-config/issues/375)) ([663f421](https://www.github.com/googleapis/java-shared-config/commit/663f421de342afcba24703079f778738045d3ff2)) - **java:** Pass missing integration test flags to native image test commands ([#​1309](https://www.togithub.com/googleapis/java-shared-config/issues/1309)) ([#​383](https://www.togithub.com/googleapis/java-shared-config/issues/383)) ([b17b44e](https://www.github.com/googleapis/java-shared-config/commit/b17b44e37fe44ba61616417189c6b2271f3a4d18)) ##### Dependencies - update auto-value-annotation.version to v1.9 ([#​378](https://www.togithub.com/googleapis/java-shared-config/issues/378)) ([5e1cd0e](https://www.github.com/googleapis/java-shared-config/commit/5e1cd0e39910548ec4eb6639da979c3b66411503)) - update dependency com.google.googlejavaformat:google-java-format to v1.13.0 ([#​361](https://www.togithub.com/googleapis/java-shared-config/issues/361)) ([095d60a](https://www.github.com/googleapis/java-shared-config/commit/095d60a061a574dcf84b9fcf26dff48617a306b1)) - update dependency com.puppycrawl.tools:checkstyle to v9.2 ([#​366](https://www.togithub.com/googleapis/java-shared-config/issues/366)) ([061df67](https://www.github.com/googleapis/java-shared-config/commit/061df676d8b2fef5bbb0ce9661d3c96fcb57e73a)) - update dependency com.puppycrawl.tools:checkstyle to v9.2.1 ([#​382](https://www.togithub.com/googleapis/java-shared-config/issues/382)) ([1a182c5](https://www.github.com/googleapis/java-shared-config/commit/1a182c52e7c5431875296940d68c9bdfcf74be00)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.9 ([#​379](https://www.togithub.com/googleapis/java-shared-config/issues/379)) ([0a2b05f](https://www.github.com/googleapis/java-shared-config/commit/0a2b05ff7f649331efbc4dd540705da10691a2f1)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.8 ([#​372](https://www.togithub.com/googleapis/java-shared-config/issues/372)) ([6fe795e](https://www.github.com/googleapis/java-shared-config/commit/6fe795ede39575656ef1609bf7aac28c1d170976)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.9 ([#​380](https://www.togithub.com/googleapis/java-shared-config/issues/380)) ([f2efad5](https://www.github.com/googleapis/java-shared-config/commit/f2efad585b431fe186c7900a8171a999c689405b)) - update dependency org.junit.vintage:junit-vintage-engine to v5.8.2 ([#​365](https://www.togithub.com/googleapis/java-shared-config/issues/365)) ([604058d](https://www.github.com/googleapis/java-shared-config/commit/604058d52dc962db9a506762926576542687285e)) ##### [1.2.2](https://www.github.com/googleapis/java-shared-config/compare/v1.2.1...v1.2.2) (2021-11-16) ##### Bug Fixes - update dependency com.google.cloud:native-image-support to v0.10.0 ([#​358](https://www.togithub.com/googleapis/java-shared-config/issues/358)) ([0441958](https://www.github.com/googleapis/java-shared-config/commit/044195865a1122d419cadae90fddbf8dc5b4a32d)) ##### [1.2.1](https://www.github.com/googleapis/java-shared-config/compare/v1.2.0...v1.2.1) (2021-11-08) ##### Bug Fixes - Add native image feature to register protobuf reflection in tests ([#​347](https://www.togithub.com/googleapis/java-shared-config/issues/347)) ([88c3e3b](https://www.github.com/googleapis/java-shared-config/commit/88c3e3b0ad1e480e0fdbe9f6fe1f9df183066ee6)) ##### Dependencies - update dependency com.google.auto.service:auto-service-annotations to v1.0.1 ([#​346](https://www.togithub.com/googleapis/java-shared-config/issues/346)) ([9c1f943](https://www.github.com/googleapis/java-shared-config/commit/9c1f94345fb47346fe66f901976c2347b8102bc8)) - update dependency com.google.cloud:native-image-support to v0.9.0 ([#​350](https://www.togithub.com/googleapis/java-shared-config/issues/350)) ([3b496b0](https://www.github.com/googleapis/java-shared-config/commit/3b496b03bd95e59fcd1a3a1eb6cc0dfd330db769)) - update dependency com.puppycrawl.tools:checkstyle to v9.1 ([#​345](https://www.togithub.com/googleapis/java-shared-config/issues/345)) ([f5c03d3](https://www.github.com/googleapis/java-shared-config/commit/f5c03d35684ef4e0bb3178ab6056f231f3f4faf6))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1bb8ea27..361c6e6e 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.3 + 1.0.4 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.3' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.4' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.3" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.4" ``` ## Authentication diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 5e56cd80..3996769f 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.2.7 + 1.3.0 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 3cbd12fe..ba696c72 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.2.7 + 1.3.0 From 45b046ab6acaa68f101962ff43a3d610412335f2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 15 Mar 2022 19:24:15 +0100 Subject: [PATCH 083/203] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.12 (#187) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.11` -> `1.6.12` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.12/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.12/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.12/compatibility-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.12/confidence-slim/1.6.11)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index 6f16082c..db47461d 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.11 + 1.6.12 true From 426f9702ca98b4758ffe9c44f3fc4ca0f83ef92d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 24 Mar 2022 19:25:51 +0100 Subject: [PATCH 084/203] deps: update actions/checkout action to v3 (#176) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update actions/checkout action to v3 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot From 8da939f4dec0f7560181b2b40227542daf5d8040 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:32:13 +0000 Subject: [PATCH 085/203] chore(main): release 1.0.5 (#188) :robot: I have created a release *beep* *boop* --- ### [1.0.5](https://github.com/googleapis/java-binary-authorization/compare/v1.0.4...v1.0.5) (2022-03-24) ### Dependencies * update actions/checkout action to v3 ([#176](https://github.com/googleapis/java-binary-authorization/issues/176)) ([426f970](https://github.com/googleapis/java-binary-authorization/commit/426f9702ca98b4758ffe9c44f3fc4ca0f83ef92d)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a406f0f..c8267667 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.5](https://github.com/googleapis/java-binary-authorization/compare/v1.0.4...v1.0.5) (2022-03-24) + + +### Dependencies + +* update actions/checkout action to v3 ([#176](https://github.com/googleapis/java-binary-authorization/issues/176)) ([426f970](https://github.com/googleapis/java-binary-authorization/commit/426f9702ca98b4758ffe9c44f3fc4ca0f83ef92d)) + ### [1.0.4](https://github.com/googleapis/java-binary-authorization/compare/v1.0.3...v1.0.4) (2022-03-08) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 3996769f..6d4d7594 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.5-SNAPSHOT + 1.0.5 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.5-SNAPSHOT + 1.0.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 7ace5aa6..2ec1d22f 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.5-SNAPSHOT + 1.0.5 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.5-SNAPSHOT + 1.0.5 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index c10beab4..a592c83c 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5-SNAPSHOT + 1.0.5 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 6bce72e9..1825fb34 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5-SNAPSHOT + 1.0.5 diff --git a/pom.xml b/pom.xml index ba696c72..5960ecbe 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.5-SNAPSHOT + 1.0.5 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.5-SNAPSHOT + 1.0.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index a95efced..d5ac7e2c 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5-SNAPSHOT + 1.0.5 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5-SNAPSHOT + 1.0.5 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 9ab66dc6..faa7562c 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5-SNAPSHOT + 0.5.5 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5-SNAPSHOT + 1.0.5 diff --git a/versions.txt b/versions.txt index 5fd06721..d73944a0 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.4:1.0.5-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.5-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.4:1.0.5-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.4:0.5.5-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.4:1.0.5-SNAPSHOT +google-cloud-binary-authorization:1.0.5:1.0.5 +grpc-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.5 +grpc-google-cloud-binary-authorization-v1:1.0.5:1.0.5 +proto-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.5 +proto-google-cloud-binary-authorization-v1:1.0.5:1.0.5 From 3417d8fb466fa59c154e39e4f4ed2ae7a91df703 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 24 Mar 2022 18:38:15 +0000 Subject: [PATCH 086/203] chore(main): release 1.0.6-SNAPSHOT (#189) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 6d4d7594..09e1ba5c 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.5 + 1.0.6-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.5 + 1.0.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 2ec1d22f..0fec57b9 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.5 + 1.0.6-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.5 + 1.0.6-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index a592c83c..a088511e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5 + 1.0.6-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 1825fb34..8d66fe8f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5 + 1.0.6-SNAPSHOT diff --git a/pom.xml b/pom.xml index 5960ecbe..a79fd90b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.5 + 1.0.6-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.5 + 1.0.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index d5ac7e2c..8bcd8390 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.5 + 1.0.6-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5 + 1.0.6-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index faa7562c..708f73fb 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.5 + 0.5.6-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.5 + 1.0.6-SNAPSHOT diff --git a/versions.txt b/versions.txt index d73944a0..fbf7c9c1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.5:1.0.5 -grpc-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.5 -grpc-google-cloud-binary-authorization-v1:1.0.5:1.0.5 -proto-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.5 -proto-google-cloud-binary-authorization-v1:1.0.5:1.0.5 +google-cloud-binary-authorization:1.0.5:1.0.6-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.6-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.5:1.0.6-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.6-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.5:1.0.6-SNAPSHOT From ae597c542da60fc292fe1d204ccef07ad23221f7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 29 Mar 2022 20:06:28 +0200 Subject: [PATCH 087/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 (#191) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.8.0` -> `2.9.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.9.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.9.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.9.0/compatibility-slim/2.8.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.9.0/confidence-slim/2.8.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.9.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​290-httpsgithubcomgoogleapisjava-shared-dependenciescomparev280v290-2022-03-28) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.8.0...v2.9.0) ##### Dependencies - guava 31.1 ([#​635](https://togithub.com/googleapis/java-shared-dependencies/issues/635)) ([0939b06](https://togithub.com/googleapis/java-shared-dependencies/commit/0939b063a79cd4ffafb49cf04861ce577e35efd6)) - update dependency com.fasterxml.jackson:jackson-bom to v2.13.2 ([#​626](https://togithub.com/googleapis/java-shared-dependencies/issues/626)) ([6014663](https://togithub.com/googleapis/java-shared-dependencies/commit/601466339c9631faa88033d1ff1e31582fb67b7b)) - update dependency com.fasterxml.jackson:jackson-bom to v2.13.2.20220324 ([#​636](https://togithub.com/googleapis/java-shared-dependencies/issues/636)) ([6c833fa](https://togithub.com/googleapis/java-shared-dependencies/commit/6c833faa7815147013999bfc2bb6935fd8fe6b34)) - update dependency com.google.api-client:google-api-client-bom to v1.33.4 ([#​642](https://togithub.com/googleapis/java-shared-dependencies/issues/642)) ([57bd912](https://togithub.com/googleapis/java-shared-dependencies/commit/57bd9124ce8981b7b3b5d0c87b7c1e5f935b7150)) - update dependency com.google.api:api-common to v2.1.5 ([#​637](https://togithub.com/googleapis/java-shared-dependencies/issues/637)) ([d3a00fa](https://togithub.com/googleapis/java-shared-dependencies/commit/d3a00fa5ce9908000122d8365fb2f2d0e388494b)) - update dependency com.google.auth:google-auth-library-bom to v1.6.0 ([#​631](https://togithub.com/googleapis/java-shared-dependencies/issues/631)) ([53dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/53dc7c2fe255a6c7ca059dd414449bf96780f936)) - update dependency com.google.cloud:google-cloud-core-bom to v2.5.11 ([#​644](https://togithub.com/googleapis/java-shared-dependencies/issues/644)) ([4331dcc](https://togithub.com/googleapis/java-shared-dependencies/commit/4331dcc331e8377fcc57e5404321611186ca22cb)) - update dependency com.google.http-client:google-http-client-bom to v1.41.5 ([#​638](https://togithub.com/googleapis/java-shared-dependencies/issues/638)) ([e007d23](https://togithub.com/googleapis/java-shared-dependencies/commit/e007d2381bd388a1c199fc3f31d0b965f8ae592d)) - update dependency io.grpc:grpc-bom to v1.45.0 ([#​630](https://togithub.com/googleapis/java-shared-dependencies/issues/630)) ([20334e3](https://togithub.com/googleapis/java-shared-dependencies/commit/20334e30d256897cd7ef52c646e5c4549cd7ae69)) - update dependency org.threeten:threetenbp to v1.6.0 ([#​633](https://togithub.com/googleapis/java-shared-dependencies/issues/633)) ([1a2716d](https://togithub.com/googleapis/java-shared-dependencies/commit/1a2716d22e442c5cd6adea9449756b9ac3ddbf8e)) - update gax.version to v2.13.0 ([#​641](https://togithub.com/googleapis/java-shared-dependencies/issues/641)) ([b863746](https://togithub.com/googleapis/java-shared-dependencies/commit/b863746727fadd45c35198f58eb862f47fe14945)) - update google.common-protos.version to v2.8.0 ([#​639](https://togithub.com/googleapis/java-shared-dependencies/issues/639)) ([252afba](https://togithub.com/googleapis/java-shared-dependencies/commit/252afba1df8e4cfdf2574d127097b0978b7778c0)) - update google.core.version to v2.5.10 ([#​628](https://togithub.com/googleapis/java-shared-dependencies/issues/628)) ([fec6f51](https://togithub.com/googleapis/java-shared-dependencies/commit/fec6f5121384a04a389bad6f6477a9a5ce468016)) - update iam.version to v1.2.10 ([#​625](https://togithub.com/googleapis/java-shared-dependencies/issues/625)) ([0d7ca29](https://togithub.com/googleapis/java-shared-dependencies/commit/0d7ca2924bd24abe14883c173156bb4dc5fb90bf))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 361c6e6e..35db75f0 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.4 + 1.0.5 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.4' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.5' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.4" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.5" ``` ## Authentication diff --git a/pom.xml b/pom.xml index a79fd90b..ed9d50ec 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.8.0 + 2.9.0 pom import From 44e5e01d92e4616bc3ebc43b00a63260be428c5f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 18:28:26 +0000 Subject: [PATCH 088/203] chore(main): release 1.0.6 (#192) :robot: I have created a release *beep* *boop* --- ### [1.0.6](https://github.com/googleapis/java-binary-authorization/compare/v1.0.5...v1.0.6) (2022-03-29) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#191](https://github.com/googleapis/java-binary-authorization/issues/191)) ([ae597c5](https://github.com/googleapis/java-binary-authorization/commit/ae597c542da60fc292fe1d204ccef07ad23221f7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8267667..78ac5117 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.6](https://github.com/googleapis/java-binary-authorization/compare/v1.0.5...v1.0.6) (2022-03-29) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#191](https://github.com/googleapis/java-binary-authorization/issues/191)) ([ae597c5](https://github.com/googleapis/java-binary-authorization/commit/ae597c542da60fc292fe1d204ccef07ad23221f7)) + ### [1.0.5](https://github.com/googleapis/java-binary-authorization/compare/v1.0.4...v1.0.5) (2022-03-24) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 09e1ba5c..49f14ff1 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.6-SNAPSHOT + 1.0.6 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.6-SNAPSHOT + 1.0.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 0fec57b9..7551cac7 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.6-SNAPSHOT + 1.0.6 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.6-SNAPSHOT + 1.0.6 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index a088511e..f4998c9e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6-SNAPSHOT + 1.0.6 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 8d66fe8f..2eac0f40 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6-SNAPSHOT + 1.0.6 diff --git a/pom.xml b/pom.xml index ed9d50ec..8444233c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.6-SNAPSHOT + 1.0.6 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.6-SNAPSHOT + 1.0.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 8bcd8390..f79a9d52 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6-SNAPSHOT + 1.0.6 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6-SNAPSHOT + 1.0.6 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 708f73fb..e13b85bf 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6-SNAPSHOT + 0.5.6 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6-SNAPSHOT + 1.0.6 diff --git a/versions.txt b/versions.txt index fbf7c9c1..a49a1ce6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.5:1.0.6-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.6-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.5:1.0.6-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.5:0.5.6-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.5:1.0.6-SNAPSHOT +google-cloud-binary-authorization:1.0.6:1.0.6 +grpc-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.6 +grpc-google-cloud-binary-authorization-v1:1.0.6:1.0.6 +proto-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.6 +proto-google-cloud-binary-authorization-v1:1.0.6:1.0.6 From 1180d2278f23389acc31f3e2d9d3ac9eb5e8ab6a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 29 Mar 2022 20:54:43 +0200 Subject: [PATCH 089/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.3.2 (#190) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.3.2 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 49f14ff1..f0962c45 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.3.0 + 1.3.2 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 8444233c..88675c60 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.3.0 + 1.3.2 From 9bd4b132d19ad9b0e1bcb92fc235eef9922007ea Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 29 Mar 2022 19:06:17 +0000 Subject: [PATCH 090/203] chore(main): release 1.0.7-SNAPSHOT (#193) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index f0962c45..444e4d63 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.6 + 1.0.7-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.6 + 1.0.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 7551cac7..c4fd570b 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.6 + 1.0.7-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.6 + 1.0.7-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f4998c9e..411f42b8 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6 + 1.0.7-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 2eac0f40..7b88941b 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6 + 1.0.7-SNAPSHOT diff --git a/pom.xml b/pom.xml index 88675c60..f5c60f8b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.6 + 1.0.7-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.6 + 1.0.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index f79a9d52..d9a1bb52 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.6 + 1.0.7-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6 + 1.0.7-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index e13b85bf..029b18a5 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.6 + 0.5.7-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.6 + 1.0.7-SNAPSHOT diff --git a/versions.txt b/versions.txt index a49a1ce6..7e08c88c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.6:1.0.6 -grpc-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.6 -grpc-google-cloud-binary-authorization-v1:1.0.6:1.0.6 -proto-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.6 -proto-google-cloud-binary-authorization-v1:1.0.6:1.0.6 +google-cloud-binary-authorization:1.0.6:1.0.7-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.7-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.6:1.0.7-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.7-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.6:1.0.7-SNAPSHOT From 3003be8b7cf43a14628f6d584896946571201298 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 17:06:16 +0000 Subject: [PATCH 091/203] chore(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.12 (#1388) (#196) Co-authored-by: Neenu Shaji Source-Link: https://github.com/googleapis/synthtool/commit/4c770a0c6ef46b8462608c485735801b65be65ea Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 --- .github/.OwlBot.lock.yaml | 3 ++- README.md | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 426cf83e..0598f87d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:b0b1c1c89570e229b1026372a2b8989ba31495007055b8d30178b7648503eefa + digest: sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 +# created: 2022-04-01T19:51:01.017179449Z diff --git a/README.md b/README.md index 35db75f0..43fa0f4e 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.5 + 1.0.6 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.5' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.6' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.5" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.6" ``` ## Authentication From 6675042526647bf1e571b53ed0178c6fe4a96f35 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 6 Apr 2022 16:48:26 +0000 Subject: [PATCH 092/203] chore: upgrade black in noxfile.py to 22.3.0 (#1377) (#197) * chore: upgrade black to 22.3.0 * update lint also * run blacken session * ci: use click>8.0 for blacken/lint sessions * chore: fix typo Co-authored-by: nicain * rebase error Co-authored-by: nicain Source-Link: https://github.com/googleapis/synthtool/commit/0dcf73928241fa27d7768e14c435e3d9f526beac Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:4a8d2d787ea374ba929e37c39c4b16d2498044e24ef123077125b946cac2dcdc --- .github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0598f87d..e0e0b1bc 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:029f8a2fcd20ab09808e4a5cf5f3866f5976b6635197c764679f9b22591aab58 -# created: 2022-04-01T19:51:01.017179449Z + digest: sha256:4a8d2d787ea374ba929e37c39c4b16d2498044e24ef123077125b946cac2dcdc +# created: 2022-04-01T22:15:20.641398017Z \ No newline at end of file From f1e6d1da541d3fe271cb7ee8a615a9570eb152d8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 7 Apr 2022 19:06:23 +0200 Subject: [PATCH 093/203] deps: update dependency io.grafeas:grafeas to v2.2.3 (#195) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.2.2` -> `2.2.3` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.3/compatibility-slim/2.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.3/confidence-slim/2.2.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.2.3`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​223-httpsgithubcomgoogleapisjava-grafeascomparev222v223-2022-03-29) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.2.2...v2.2.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f5c60f8b..33a3cffa 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.2.2 + 2.2.3 From 374472a1270d0f850dc566ab08127c05a73c288d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 01:08:21 +0000 Subject: [PATCH 094/203] chore: Enable Size-Label bot in all googleapis Java repositories (#1381) (#198) * chore: Enable Size-Label bot in all googleapis Java repositories Auto-label T-shirt size indicator should be assigned on every new pull request in all googleapis Java repositories * Remove product Remove product since it is by default true * add license header Co-authored-by: Neenu Shaji Source-Link: https://github.com/googleapis/synthtool/commit/54b2c6ac75370a4a3582431b4a3080f777ba1f11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/auto-label.yaml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 .github/auto-label.yaml diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index e0e0b1bc..095b0d19 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:4a8d2d787ea374ba929e37c39c4b16d2498044e24ef123077125b946cac2dcdc -# created: 2022-04-01T22:15:20.641398017Z \ No newline at end of file + digest: sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813 +# created: 2022-04-06T16:30:03.627422514Z \ No newline at end of file diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml new file mode 100644 index 00000000..4caef688 --- /dev/null +++ b/.github/auto-label.yaml @@ -0,0 +1,15 @@ +# 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. +requestsize: + enabled: true From a9b16cd8c045a8841ddb039727614d467ee6228f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 01:14:12 +0000 Subject: [PATCH 095/203] chore(main): release 1.0.7 (#199) :robot: I have created a release *beep* *boop* --- ### [1.0.7](https://github.com/googleapis/java-binary-authorization/compare/v1.0.6...v1.0.7) (2022-04-08) ### Dependencies * update dependency io.grafeas:grafeas to v2.2.3 ([#195](https://github.com/googleapis/java-binary-authorization/issues/195)) ([f1e6d1d](https://github.com/googleapis/java-binary-authorization/commit/f1e6d1da541d3fe271cb7ee8a615a9570eb152d8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 78ac5117..b75df15f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.7](https://github.com/googleapis/java-binary-authorization/compare/v1.0.6...v1.0.7) (2022-04-08) + + +### Dependencies + +* update dependency io.grafeas:grafeas to v2.2.3 ([#195](https://github.com/googleapis/java-binary-authorization/issues/195)) ([f1e6d1d](https://github.com/googleapis/java-binary-authorization/commit/f1e6d1da541d3fe271cb7ee8a615a9570eb152d8)) + ### [1.0.6](https://github.com/googleapis/java-binary-authorization/compare/v1.0.5...v1.0.6) (2022-03-29) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 444e4d63..466e146c 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.7-SNAPSHOT + 1.0.7 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.7-SNAPSHOT + 1.0.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index c4fd570b..6f69277e 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.7-SNAPSHOT + 1.0.7 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.7-SNAPSHOT + 1.0.7 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 411f42b8..f2777248 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7-SNAPSHOT + 1.0.7 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 7b88941b..1393e4be 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7-SNAPSHOT + 1.0.7 diff --git a/pom.xml b/pom.xml index 33a3cffa..198ca948 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.7-SNAPSHOT + 1.0.7 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.7-SNAPSHOT + 1.0.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index d9a1bb52..47942542 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7-SNAPSHOT + 1.0.7 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7-SNAPSHOT + 1.0.7 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 029b18a5..788f2132 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7-SNAPSHOT + 0.5.7 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7-SNAPSHOT + 1.0.7 diff --git a/versions.txt b/versions.txt index 7e08c88c..87063f00 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.6:1.0.7-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.7-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.6:1.0.7-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.6:0.5.7-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.6:1.0.7-SNAPSHOT +google-cloud-binary-authorization:1.0.7:1.0.7 +grpc-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.7 +grpc-google-cloud-binary-authorization-v1:1.0.7:1.0.7 +proto-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.7 +proto-google-cloud-binary-authorization-v1:1.0.7:1.0.7 From 418d131a61dad4e1c700ee8129dade5b69bde0d6 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 8 Apr 2022 01:20:12 +0000 Subject: [PATCH 096/203] chore(main): release 1.0.8-SNAPSHOT (#200) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 466e146c..d9e2736d 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.7 + 1.0.8-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.7 + 1.0.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 6f69277e..53ecb2cc 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.7 + 1.0.8-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.7 + 1.0.8-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f2777248..5d6eb77e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7 + 1.0.8-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 1393e4be..b3238ba2 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7 + 1.0.8-SNAPSHOT diff --git a/pom.xml b/pom.xml index 198ca948..6d9cf719 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.7 + 1.0.8-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.7 + 1.0.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 47942542..94fe7be0 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.7 + 1.0.8-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7 + 1.0.8-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 788f2132..5de774e1 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.7 + 0.5.8-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.7 + 1.0.8-SNAPSHOT diff --git a/versions.txt b/versions.txt index 87063f00..8842fd4c 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.7:1.0.7 -grpc-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.7 -grpc-google-cloud-binary-authorization-v1:1.0.7:1.0.7 -proto-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.7 -proto-google-cloud-binary-authorization-v1:1.0.7:1.0.7 +google-cloud-binary-authorization:1.0.7:1.0.8-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.8-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.7:1.0.8-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.8-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.7:1.0.8-SNAPSHOT From 16f72c626da902a9bb37f6254361b8598bd78dc5 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 15 Apr 2022 21:26:15 +0200 Subject: [PATCH 097/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 (#201) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.9.0` -> `2.10.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.10.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.10.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.10.0/compatibility-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.10.0/confidence-slim/2.9.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.10.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2100-httpsgithubcomgoogleapisjava-shared-dependenciescomparev290v2100-2022-04-15) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.9.0...v2.10.0) ##### Dependencies - google-cloud-core 2.6.0 ([#​668](https://togithub.com/googleapis/java-shared-dependencies/issues/668)) ([22f4d18](https://togithub.com/googleapis/java-shared-dependencies/commit/22f4d1809cbb9848174b3569ab527e4bef00d443)) - reverting protobuf to 3.19.4 ([#​657](https://togithub.com/googleapis/java-shared-dependencies/issues/657)) ([8501e6d](https://togithub.com/googleapis/java-shared-dependencies/commit/8501e6d842c10d2370bbd5d5246070134336bddd)) - update dependency com.fasterxml.jackson:jackson-bom to v2.13.2.20220328 ([#​646](https://togithub.com/googleapis/java-shared-dependencies/issues/646)) ([7bfd6d7](https://togithub.com/googleapis/java-shared-dependencies/commit/7bfd6d7073859d1955b91b368c6713a72ffa14b6)) - update dependency com.google.api-client:google-api-client-bom to v1.34.0 ([#​662](https://togithub.com/googleapis/java-shared-dependencies/issues/662)) ([1b8e378](https://togithub.com/googleapis/java-shared-dependencies/commit/1b8e378fe0ccf2a28c759868caaf5ba593a95728)) - update dependency com.google.errorprone:error_prone_annotations to v2.12.1 ([#​652](https://togithub.com/googleapis/java-shared-dependencies/issues/652)) ([1cc80ee](https://togithub.com/googleapis/java-shared-dependencies/commit/1cc80ee984ebcad9bc2a95e2f28c0a49fe924b37)) - update dependency com.google.errorprone:error_prone_annotations to v2.13.0 ([#​669](https://togithub.com/googleapis/java-shared-dependencies/issues/669)) ([61b7834](https://togithub.com/googleapis/java-shared-dependencies/commit/61b78341b34a251722be4805a6bdd895cd64836c)) - update dependency com.google.http-client:google-http-client-bom to v1.41.6 ([#​654](https://togithub.com/googleapis/java-shared-dependencies/issues/654)) ([140ef40](https://togithub.com/googleapis/java-shared-dependencies/commit/140ef405bc17ed83f5ce177df59affca14fbe49c)) - update dependency com.google.http-client:google-http-client-bom to v1.41.7 ([#​658](https://togithub.com/googleapis/java-shared-dependencies/issues/658)) ([f6f93e5](https://togithub.com/googleapis/java-shared-dependencies/commit/f6f93e5b9172c9684623c4c148e4a8fe2fae1e94)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.2 ([#​655](https://togithub.com/googleapis/java-shared-dependencies/issues/655)) ([20cd9ed](https://togithub.com/googleapis/java-shared-dependencies/commit/20cd9eda112c96836a5ab7485a4247ed2bc0edb8)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.33.3 ([#​663](https://togithub.com/googleapis/java-shared-dependencies/issues/663)) ([f011a46](https://togithub.com/googleapis/java-shared-dependencies/commit/f011a46c551dba16851b4f8c919c40452fc5d5c3)) - update dependency com.google.protobuf:protobuf-bom to v3.20.0 ([#​651](https://togithub.com/googleapis/java-shared-dependencies/issues/651)) ([ad2ff73](https://togithub.com/googleapis/java-shared-dependencies/commit/ad2ff73207dd6493321c77d8eca0022baf13b4ce)) - update dependency io.grpc:grpc-bom to v1.45.1 ([#​647](https://togithub.com/googleapis/java-shared-dependencies/issues/647)) ([38e46fc](https://togithub.com/googleapis/java-shared-dependencies/commit/38e46fc4f03af0a02f30ce4a2fa222c71797ae15)) - update dependency org.checkerframework:checker-qual to v3.21.4 ([#​650](https://togithub.com/googleapis/java-shared-dependencies/issues/650)) ([125e80a](https://togithub.com/googleapis/java-shared-dependencies/commit/125e80ab2c3225a00c03f5ff5de94872ebb94303)) - update gax.version to v2.15.0 ([#​649](https://togithub.com/googleapis/java-shared-dependencies/issues/649)) ([c7f32a6](https://togithub.com/googleapis/java-shared-dependencies/commit/c7f32a68b14520104432282ac9598643700162eb)) - update gax.version to v2.16.0 ([#​664](https://togithub.com/googleapis/java-shared-dependencies/issues/664)) ([caaf941](https://togithub.com/googleapis/java-shared-dependencies/commit/caaf941643af04295f5527a0144587d7bf040862)) - update google.common-protos.version to v2.8.1 ([#​656](https://togithub.com/googleapis/java-shared-dependencies/issues/656)) ([df4a4a2](https://togithub.com/googleapis/java-shared-dependencies/commit/df4a4a2130a3cdb2965ea42962d1ea6a85506ba7)) - update google.common-protos.version to v2.8.2 ([#​659](https://togithub.com/googleapis/java-shared-dependencies/issues/659)) ([b499e2b](https://togithub.com/googleapis/java-shared-dependencies/commit/b499e2bc99506d48d26e35bf6e68c09409ce8b11)) - update google.common-protos.version to v2.8.3 ([#​660](https://togithub.com/googleapis/java-shared-dependencies/issues/660)) ([461081c](https://togithub.com/googleapis/java-shared-dependencies/commit/461081c0cf73057c1f6e07fc573453ad467a60ae)) - update iam.version to v1.3.0 ([#​648](https://togithub.com/googleapis/java-shared-dependencies/issues/648)) ([6670c4f](https://togithub.com/googleapis/java-shared-dependencies/commit/6670c4f61fcf075c543bfd148eea49796e0662ce)) - update iam.version to v1.3.1 ([#​661](https://togithub.com/googleapis/java-shared-dependencies/issues/661)) ([cc8fbe6](https://togithub.com/googleapis/java-shared-dependencies/commit/cc8fbe6eae03341c2ece7d3356febc843a74a812))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 43fa0f4e..c41d4a5a 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.6 + 1.0.7 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.6' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.7' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.6" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.7" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 6d9cf719..f6485295 100644 --- a/pom.xml +++ b/pom.xml @@ -92,7 +92,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.9.0 + 2.10.0 pom import From f0e45f17bfd7797ca4e4ce23f8bc97439c02043a Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 19:38:12 +0000 Subject: [PATCH 098/203] chore(main): release 1.0.8 (#202) :robot: I have created a release *beep* *boop* --- ### [1.0.8](https://github.com/googleapis/java-binary-authorization/compare/v1.0.7...v1.0.8) (2022-04-15) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#201](https://github.com/googleapis/java-binary-authorization/issues/201)) ([16f72c6](https://github.com/googleapis/java-binary-authorization/commit/16f72c626da902a9bb37f6254361b8598bd78dc5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b75df15f..3600ea6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.8](https://github.com/googleapis/java-binary-authorization/compare/v1.0.7...v1.0.8) (2022-04-15) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#201](https://github.com/googleapis/java-binary-authorization/issues/201)) ([16f72c6](https://github.com/googleapis/java-binary-authorization/commit/16f72c626da902a9bb37f6254361b8598bd78dc5)) + ### [1.0.7](https://github.com/googleapis/java-binary-authorization/compare/v1.0.6...v1.0.7) (2022-04-08) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index d9e2736d..acdcb815 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.8-SNAPSHOT + 1.0.8 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.8-SNAPSHOT + 1.0.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 53ecb2cc..506d56f2 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.8-SNAPSHOT + 1.0.8 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.8-SNAPSHOT + 1.0.8 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 5d6eb77e..f2c4307e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8-SNAPSHOT + 1.0.8 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index b3238ba2..ff83aeff 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8-SNAPSHOT + 1.0.8 diff --git a/pom.xml b/pom.xml index f6485295..0cb79068 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.8-SNAPSHOT + 1.0.8 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.8-SNAPSHOT + 1.0.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 94fe7be0..e7f695ec 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8-SNAPSHOT + 1.0.8 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8-SNAPSHOT + 1.0.8 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 5de774e1..26f429d9 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8-SNAPSHOT + 0.5.8 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8-SNAPSHOT + 1.0.8 diff --git a/versions.txt b/versions.txt index 8842fd4c..5cf2ca22 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.7:1.0.8-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.8-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.7:1.0.8-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.7:0.5.8-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.7:1.0.8-SNAPSHOT +google-cloud-binary-authorization:1.0.8:1.0.8 +grpc-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.8 +grpc-google-cloud-binary-authorization-v1:1.0.8:1.0.8 +proto-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.8 +proto-google-cloud-binary-authorization-v1:1.0.8:1.0.8 From 9f517ac7493cf22fc880c6d0a496744149356b48 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 15 Apr 2022 19:50:22 +0000 Subject: [PATCH 099/203] chore(main): release 1.0.9-SNAPSHOT (#203) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index acdcb815..7b163974 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.8 + 1.0.9-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 506d56f2..338fc11f 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.8 + 1.0.9-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.8 + 1.0.9-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f2c4307e..b3433ff2 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index ff83aeff..848e791d 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/pom.xml b/pom.xml index 0cb79068..d31f84a0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.8 + 1.0.9-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index e7f695ec..0bbd7dbe 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.8 + 1.0.9-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 26f429d9..77567768 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.8 + 0.5.9-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.8 + 1.0.9-SNAPSHOT diff --git a/versions.txt b/versions.txt index 5cf2ca22..131f37e7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.8:1.0.8 -grpc-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.8 -grpc-google-cloud-binary-authorization-v1:1.0.8:1.0.8 -proto-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.8 -proto-google-cloud-binary-authorization-v1:1.0.8:1.0.8 +google-cloud-binary-authorization:1.0.8:1.0.9-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.9-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.8:1.0.9-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.9-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.8:1.0.9-SNAPSHOT From fc7b2e780fe7f50ba308fa1dbdd7b664d82d595b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Apr 2022 17:40:42 +0200 Subject: [PATCH 100/203] deps: update dependency io.grafeas:grafeas to v2.2.4 (#204) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.2.3` -> `2.2.4` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.4/compatibility-slim/2.2.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.2.4/confidence-slim/2.2.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.2.4`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​224-httpsgithubcomgoogleapisjava-grafeascomparev223v224-2022-04-15) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.2.3...v2.2.4)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c41d4a5a..56cf9732 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.7 + 1.0.8 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.7' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.8' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.7" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.8" ``` ## Authentication diff --git a/pom.xml b/pom.xml index d31f84a0..c962f0d8 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.2.3 + 2.2.4 From 484b710c77c2b1c0741c1a55494e03c16abbe230 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 15:58:38 +0000 Subject: [PATCH 101/203] chore(main): release 1.0.9 (#205) :robot: I have created a release *beep* *boop* --- ### [1.0.9](https://github.com/googleapis/java-binary-authorization/compare/v1.0.8...v1.0.9) (2022-04-18) ### Dependencies * update dependency io.grafeas:grafeas to v2.2.4 ([#204](https://github.com/googleapis/java-binary-authorization/issues/204)) ([fc7b2e7](https://github.com/googleapis/java-binary-authorization/commit/fc7b2e780fe7f50ba308fa1dbdd7b664d82d595b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3600ea6d..5b429680 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.0.9](https://github.com/googleapis/java-binary-authorization/compare/v1.0.8...v1.0.9) (2022-04-18) + + +### Dependencies + +* update dependency io.grafeas:grafeas to v2.2.4 ([#204](https://github.com/googleapis/java-binary-authorization/issues/204)) ([fc7b2e7](https://github.com/googleapis/java-binary-authorization/commit/fc7b2e780fe7f50ba308fa1dbdd7b664d82d595b)) + ### [1.0.8](https://github.com/googleapis/java-binary-authorization/compare/v1.0.7...v1.0.8) (2022-04-15) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 7b163974..0d052025 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.9-SNAPSHOT + 1.0.9 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.9-SNAPSHOT + 1.0.9 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 338fc11f..c49ef444 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.9-SNAPSHOT + 1.0.9 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.9-SNAPSHOT + 1.0.9 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index b3433ff2..0bda29f4 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9-SNAPSHOT + 1.0.9 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 848e791d..7045296f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9-SNAPSHOT + 1.0.9 diff --git a/pom.xml b/pom.xml index c962f0d8..6b78c2eb 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.9-SNAPSHOT + 1.0.9 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.9-SNAPSHOT + 1.0.9 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 0bbd7dbe..2542d9d0 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9-SNAPSHOT + 1.0.9 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9-SNAPSHOT + 1.0.9 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 77567768..4880c681 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9-SNAPSHOT + 0.5.9 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9-SNAPSHOT + 1.0.9 diff --git a/versions.txt b/versions.txt index 131f37e7..617c805a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.8:1.0.9-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.9-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.8:1.0.9-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.8:0.5.9-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.8:1.0.9-SNAPSHOT +google-cloud-binary-authorization:1.0.9:1.0.9 +grpc-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.9 +grpc-google-cloud-binary-authorization-v1:1.0.9:1.0.9 +proto-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.9 +proto-google-cloud-binary-authorization-v1:1.0.9:1.0.9 From f499159a2dedecdd3a1e74fb643db8a935e9052e Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 18 Apr 2022 16:07:16 +0000 Subject: [PATCH 102/203] chore(main): release 1.0.10-SNAPSHOT (#206) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 0d052025..0b5e944b 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.9 + 1.0.10-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.9 + 1.0.10-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index c49ef444..85042753 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.9 + 1.0.10-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.9 + 1.0.10-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 0bda29f4..c485466b 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9 + 1.0.10-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 7045296f..9fa39255 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9 + 1.0.10-SNAPSHOT diff --git a/pom.xml b/pom.xml index 6b78c2eb..43f3dd70 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.9 + 1.0.10-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.9 + 1.0.10-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 2542d9d0..09541732 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.9 + 1.0.10-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9 + 1.0.10-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 4880c681..2a97a4a2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.9 + 0.5.10-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.9 + 1.0.10-SNAPSHOT diff --git a/versions.txt b/versions.txt index 617c805a..28de2115 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.9:1.0.9 -grpc-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.9 -grpc-google-cloud-binary-authorization-v1:1.0.9:1.0.9 -proto-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.9 -proto-google-cloud-binary-authorization-v1:1.0.9:1.0.9 +google-cloud-binary-authorization:1.0.9:1.0.10-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.10-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.0.9:1.0.10-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.10-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.0.9:1.0.10-SNAPSHOT From 3f011a73a4a0bc862d495cf89209af5da95de1e7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 16:44:20 +0200 Subject: [PATCH 103/203] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.0 (#208) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) ([source](https://togithub.com/apache/maven-javadoc-plugin)) | `3.3.2` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/compatibility-slim/3.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.0/confidence-slim/3.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 56cf9732..69c67a7e 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.8 + 1.0.9 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.8' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.9' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.8" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.9" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 43f3dd70..69c6fb08 100644 --- a/pom.xml +++ b/pom.xml @@ -157,7 +157,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.3.2 + 3.4.0 html From 066f54e7418ef7bcb9b45d4ee75c0f8dbfd425e1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 17:32:12 +0200 Subject: [PATCH 104/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.3.3 (#207) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.3.2` -> `1.3.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.3/compatibility-slim/1.3.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.3.3/confidence-slim/1.3.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.3.3`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​133-httpsgithubcomgoogleapisjava-shared-configcomparev132v133-2022-04-19) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.3.2...v1.3.3)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 0b5e944b..797c7821 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.3.2 + 1.3.3 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 69c6fb08..509e2940 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.3.2 + 1.3.3 From 8a9e21d18ef0b09bbc81e42837f6adfe85193df4 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 21 Apr 2022 19:34:44 +0200 Subject: [PATCH 105/203] build(deps): update dependency org.sonatype.plugins:nexus-staging-maven-plugin to v1.6.13 (#209) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.sonatype.plugins:nexus-staging-maven-plugin](http://www.sonatype.com/) ([source](https://togithub.com/sonatype/nexus-maven-plugins)) | `1.6.12` -> `1.6.13` | [![age](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/compatibility-slim/1.6.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.sonatype.plugins:nexus-staging-maven-plugin/1.6.13/confidence-slim/1.6.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
sonatype/nexus-maven-plugins ### [`v1.6.13`](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13) [Compare Source](https://togithub.com/sonatype/nexus-maven-plugins/compare/release-1.6.12...release-1.6.13)
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index db47461d..89ccdc38 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -46,7 +46,7 @@ org.sonatype.plugins nexus-staging-maven-plugin - 1.6.12 + 1.6.13 true From 7deb3d246d4889aa972dc3177a0b3f4f19cd4753 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 28 Apr 2022 19:48:16 +0000 Subject: [PATCH 106/203] chore(bazel): update version of Protobuf to v3.20.1 (#210) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 444328399 Source-Link: https://github.com/googleapis/googleapis/commit/c7ca416c2856aad6a3f7092924e56b8cf0cb2534 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d61705453a62b3ecda78aa30c192840ebc5a8a90 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDYxNzA1NDUzYTYyYjNlY2RhNzhhYTMwYzE5Mjg0MGViYzVhOGE5MCJ9 --- .../v1beta1/SystemPolicyV1Beta1Grpc.java | 1 + .../binaryauthorization/v1/Resources.java | 108 ++++++++++++------ .../cloud/binaryauthorization/v1/Service.java | 22 ++++ .../v1beta1/AdmissionRule.java | 2 + .../v1beta1/AdmissionWhitelistPattern.java | 2 + .../binaryauthorization/v1beta1/Attestor.java | 5 +- .../v1beta1/AttestorPublicKey.java | 5 +- .../v1beta1/ContinuousValidationEvent.java | 14 ++- .../v1beta1/CreateAttestorRequest.java | 2 + .../v1beta1/DeleteAttestorRequest.java | 2 + .../v1beta1/GetAttestorRequest.java | 2 + .../v1beta1/GetPolicyRequest.java | 2 + .../v1beta1/GetSystemPolicyRequest.java | 2 + .../v1beta1/ListAttestorsRequest.java | 2 + .../v1beta1/ListAttestorsResponse.java | 2 + .../v1beta1/PkixPublicKey.java | 2 + .../binaryauthorization/v1beta1/Policy.java | 78 +++++++------ .../v1beta1/PolicyOrBuilder.java | 12 ++ .../v1beta1/UpdateAttestorRequest.java | 2 + .../v1beta1/UpdatePolicyRequest.java | 2 + .../v1beta1/UserOwnedDrydockNote.java | 2 + 21 files changed, 193 insertions(+), 78 deletions(-) diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java index cf64caca..3ae0b37b 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java +++ b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java @@ -27,6 +27,7 @@ @javax.annotation.Generated( value = "by gRPC proto compiler", comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") +@io.grpc.stub.annotations.GrpcGenerated public final class SystemPolicyV1Beta1Grpc { private SystemPolicyV1Beta1Grpc() {} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java index f8a7c070..6277f6f6 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java @@ -282,9 +282,12 @@ public interface PolicyOrBuilder * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; *
*/ + + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getClusterAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue); /** @@ -367,9 +370,12 @@ public interface PolicyOrBuilder * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; *
*/ + + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesNamespaceAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue); /** @@ -447,9 +453,12 @@ public interface PolicyOrBuilder * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; *
*/ + + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue); /** @@ -539,9 +548,12 @@ public interface PolicyOrBuilder * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; *
*/ + + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getIstioServiceIdentityAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue); /** @@ -881,6 +893,8 @@ private Policy( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -1396,7 +1410,7 @@ public int getClusterAdmissionRulesCount() { @java.lang.Override public boolean containsClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetClusterAdmissionRules().getMap().containsKey(key); } @@ -1457,7 +1471,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1486,7 +1500,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getClusterAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1552,7 +1566,7 @@ public int getKubernetesNamespaceAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); } @@ -1603,7 +1617,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1627,7 +1641,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1693,7 +1707,7 @@ public int getKubernetesServiceAccountAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); } @@ -1744,7 +1758,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1768,7 +1782,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1837,7 +1851,7 @@ public int getIstioServiceIdentityAdmissionRulesCount() { @java.lang.Override public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); } @@ -1894,7 +1908,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -1921,7 +1935,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -3586,7 +3600,7 @@ public int getClusterAdmissionRulesCount() { @java.lang.Override public boolean containsClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetClusterAdmissionRules().getMap().containsKey(key); } @@ -3647,7 +3661,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -3676,7 +3690,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getClusterAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -3711,7 +3725,7 @@ public Builder clearClusterAdmissionRules() { */ public Builder removeClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); return this; @@ -3745,11 +3759,12 @@ public Builder putClusterAdmissionRules( java.lang.String key, com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); return this; } @@ -3830,7 +3845,7 @@ public int getKubernetesNamespaceAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); } @@ -3881,7 +3896,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -3905,7 +3920,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -3935,7 +3950,7 @@ public Builder clearKubernetesNamespaceAdmissionRules() { */ public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); return this; @@ -3964,11 +3979,12 @@ public Builder putKubernetesNamespaceAdmissionRules( java.lang.String key, com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); return this; } @@ -4044,7 +4060,7 @@ public int getKubernetesServiceAccountAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); } @@ -4095,7 +4111,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -4119,7 +4135,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -4149,7 +4165,7 @@ public Builder clearKubernetesServiceAccountAdmissionRules() { */ public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); return this; @@ -4178,11 +4194,12 @@ public Builder putKubernetesServiceAccountAdmissionRules( java.lang.String key, com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); return this; } @@ -4261,7 +4278,7 @@ public int getIstioServiceIdentityAdmissionRulesCount() { @java.lang.Override public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); } @@ -4318,7 +4335,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -4345,7 +4362,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map< java.lang.String, @@ -4378,7 +4395,7 @@ public Builder clearIstioServiceIdentityAdmissionRules() { */ public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); return this; @@ -4410,11 +4427,12 @@ public Builder putIstioServiceIdentityAdmissionRules( java.lang.String key, com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); return this; } @@ -5035,6 +5053,8 @@ private AdmissionWhitelistPattern( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -5909,6 +5929,8 @@ private AdmissionRule( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -7668,6 +7690,8 @@ private Attestor( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -8776,8 +8800,9 @@ public Builder mergeUserOwnedGrafeasNote( } else { if (attestorTypeCase_ == 3) { userOwnedGrafeasNoteBuilder_.mergeFrom(value); + } else { + userOwnedGrafeasNoteBuilder_.setMessage(value); } - userOwnedGrafeasNoteBuilder_.setMessage(value); } attestorTypeCase_ = 3; return this; @@ -9439,6 +9464,8 @@ private UserOwnedGrafeasNote( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -11187,6 +11214,8 @@ private PkixPublicKey( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -12726,6 +12755,8 @@ private AttestorPublicKey( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -14085,8 +14116,9 @@ public Builder mergePkixPublicKey( } else { if (publicKeyCase_ == 5) { pkixPublicKeyBuilder_.mergeFrom(value); + } else { + pkixPublicKeyBuilder_.setMessage(value); } - pkixPublicKeyBuilder_.setMessage(value); } publicKeyCase_ = 5; return this; diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java index 8856c97e..1037da0d 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java @@ -133,6 +133,8 @@ private GetPolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -871,6 +873,8 @@ private UpdatePolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -1810,6 +1814,8 @@ private CreateAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -3023,6 +3029,8 @@ private GetAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -3763,6 +3771,8 @@ private UpdateAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -4676,6 +4686,8 @@ private ListAttestorsRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -5738,6 +5750,8 @@ private ListAttestorsResponse( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -6978,6 +6992,8 @@ private DeleteAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -7706,6 +7722,8 @@ private GetSystemPolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -8574,6 +8592,8 @@ private ValidateAttestationOccurrenceRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -10029,6 +10049,8 @@ private ValidateAttestationOccurrenceResponse( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java index b2f9c2ea..7457ce20 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java @@ -113,6 +113,8 @@ private AdmissionRule( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java index 7e524017..bf7fe22e 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java @@ -89,6 +89,8 @@ private AdmissionWhitelistPattern( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java index d85e7c13..3bd13346 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java @@ -136,6 +136,8 @@ private Attestor( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -1190,8 +1192,9 @@ public Builder mergeUserOwnedDrydockNote( } else { if (attestorTypeCase_ == 3) { userOwnedDrydockNoteBuilder_.mergeFrom(value); + } else { + userOwnedDrydockNoteBuilder_.setMessage(value); } - userOwnedDrydockNoteBuilder_.setMessage(value); } attestorTypeCase_ = 3; return this; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java index 0c9b1afa..005f7715 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java @@ -124,6 +124,8 @@ private AttestorPublicKey( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -1436,8 +1438,9 @@ public Builder mergePkixPublicKey( } else { if (publicKeyCase_ == 5) { pkixPublicKeyBuilder_.mergeFrom(value); + } else { + pkixPublicKeyBuilder_.setMessage(value); } - pkixPublicKeyBuilder_.setMessage(value); } publicKeyCase_ = 5; return this; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java index 72679d3f..e3511994 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java @@ -133,6 +133,8 @@ private ContinuousValidationEvent( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -488,6 +490,8 @@ private ContinuousValidationPodEvent( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -831,6 +835,8 @@ private ImageDetails( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(this); @@ -3959,6 +3965,8 @@ private UnsupportedPolicyEvent( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -5316,8 +5324,9 @@ public Builder mergePodEvent( } else { if (eventTypeCase_ == 1) { podEventBuilder_.mergeFrom(value); + } else { + podEventBuilder_.setMessage(value); } - podEventBuilder_.setMessage(value); } eventTypeCase_ = 1; return this; @@ -5582,8 +5591,9 @@ public Builder mergeUnsupportedPolicyEvent( } else { if (eventTypeCase_ == 2) { unsupportedPolicyEventBuilder_.mergeFrom(value); + } else { + unsupportedPolicyEventBuilder_.setMessage(value); } - unsupportedPolicyEventBuilder_.setMessage(value); } eventTypeCase_ = 2; return this; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java index 667e91b7..7f1414ce 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java @@ -113,6 +113,8 @@ private CreateAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java index 3b748ac3..36c5c611 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java @@ -88,6 +88,8 @@ private DeleteAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java index e6e28dc2..a7858093 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java @@ -88,6 +88,8 @@ private GetAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java index 60a9c334..96103149 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java @@ -88,6 +88,8 @@ private GetPolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java index fbc4c75c..3b8825f4 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java @@ -88,6 +88,8 @@ private GetSystemPolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java index cb82b587..3202f69b 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java @@ -101,6 +101,8 @@ private ListAttestorsRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java index 1e599720..ede964d3 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java @@ -104,6 +104,8 @@ private ListAttestorsResponse( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java index b9b86a57..39a019d1 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java @@ -99,6 +99,8 @@ private PkixPublicKey( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java index 8db61519..90d7a396 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java @@ -238,6 +238,8 @@ private Policy( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { @@ -740,7 +742,7 @@ public int getClusterAdmissionRulesCount() { @java.lang.Override public boolean containsClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetClusterAdmissionRules().getMap().containsKey(key); } @@ -796,7 +798,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetClusterAdmissionRules().getMap(); @@ -823,7 +825,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrThrow( java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetClusterAdmissionRules().getMap(); @@ -884,7 +886,7 @@ public int getKubernetesNamespaceAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); } @@ -930,7 +932,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesNamespaceAdmissionRules().getMap(); @@ -952,7 +954,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesNamespaceAdmissionRules().getMap(); @@ -1013,7 +1015,7 @@ public int getKubernetesServiceAccountAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); } @@ -1059,7 +1061,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); @@ -1081,7 +1083,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); @@ -1145,7 +1147,7 @@ public int getIstioServiceIdentityAdmissionRulesCount() { @java.lang.Override public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); } @@ -1197,7 +1199,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetIstioServiceIdentityAdmissionRules().getMap(); @@ -1222,7 +1224,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetIstioServiceIdentityAdmissionRules().getMap(); @@ -2811,7 +2813,7 @@ public int getClusterAdmissionRulesCount() { @java.lang.Override public boolean containsClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetClusterAdmissionRules().getMap().containsKey(key); } @@ -2869,7 +2871,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetClusterAdmissionRules().getMap(); @@ -2896,7 +2898,7 @@ public boolean containsClusterAdmissionRules(java.lang.String key) { public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetClusterAdmissionRules().getMap(); @@ -2929,7 +2931,7 @@ public Builder clearClusterAdmissionRules() { */ public Builder removeClusterAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); return this; @@ -2961,11 +2963,12 @@ public Builder removeClusterAdmissionRules(java.lang.String key) { public Builder putClusterAdmissionRules( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); return this; } @@ -3041,7 +3044,7 @@ public int getKubernetesNamespaceAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); } @@ -3089,7 +3092,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesNamespaceAdmissionRules().getMap(); @@ -3111,7 +3114,7 @@ public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesNamespaceAdmissionRules().getMap(); @@ -3139,7 +3142,7 @@ public Builder clearKubernetesNamespaceAdmissionRules() { */ public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); return this; @@ -3166,11 +3169,12 @@ public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { public Builder putKubernetesNamespaceAdmissionRules( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); return this; } @@ -3241,7 +3245,7 @@ public int getKubernetesServiceAccountAdmissionRulesCount() { @java.lang.Override public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); } @@ -3289,7 +3293,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); @@ -3311,7 +3315,7 @@ public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String k public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); @@ -3339,7 +3343,7 @@ public Builder clearKubernetesServiceAccountAdmissionRules() { */ public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); return this; @@ -3366,11 +3370,12 @@ public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key public Builder putKubernetesServiceAccountAdmissionRules( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); return this; } @@ -3444,7 +3449,7 @@ public int getIstioServiceIdentityAdmissionRulesCount() { @java.lang.Override public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); } @@ -3498,7 +3503,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetIstioServiceIdentityAdmissionRules().getMap(); @@ -3523,7 +3528,7 @@ public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } java.util.Map map = internalGetIstioServiceIdentityAdmissionRules().getMap(); @@ -3554,7 +3559,7 @@ public Builder clearIstioServiceIdentityAdmissionRules() { */ public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); return this; @@ -3584,11 +3589,12 @@ public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { public Builder putIstioServiceIdentityAdmissionRules( java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { if (key == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map key"); } if (value == null) { - throw new java.lang.NullPointerException(); + throw new NullPointerException("map value"); } + internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); return this; } diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java index 39936150..80dd78c2 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java @@ -263,8 +263,11 @@ public interface PolicyOrBuilder * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; * */ + + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); /** * @@ -342,9 +345,12 @@ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRu * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; * */ + + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesNamespaceAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); /** * @@ -417,9 +423,12 @@ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRu * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; * */ + + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getKubernetesServiceAccountAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); /** * @@ -504,9 +513,12 @@ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRu * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; * */ + + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getIstioServiceIdentityAdmissionRulesOrDefault( java.lang.String key, + /* nullable */ com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); /** * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java index 58679c21..30e70531 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java @@ -96,6 +96,8 @@ private UpdateAttestorRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java index 1a948a5b..5fdcdacf 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java @@ -96,6 +96,8 @@ private UpdatePolicyRequest( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java index dd2db543..83aea8f7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java @@ -113,6 +113,8 @@ private UserOwnedDrydockNote( } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { From e57808ee2b621d9ffaf2424e35835020c17e1125 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 29 Apr 2022 22:18:32 +0200 Subject: [PATCH 107/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.4.0 (#212) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.3.3` -> `1.4.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.4.0/compatibility-slim/1.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.4.0/confidence-slim/1.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-config ### [`v1.4.0`](https://togithub.com/googleapis/java-shared-config/blob/HEAD/CHANGELOG.md#​140-httpsgithubcomgoogleapisjava-shared-configcomparev133v140-2022-04-28) [Compare Source](https://togithub.com/googleapis/java-shared-config/compare/v1.3.3...v1.4.0) ##### Features - **java:** remove native image module ([#​471](https://togithub.com/googleapis/java-shared-config/issues/471)) ([7fcba01](https://togithub.com/googleapis/java-shared-config/commit/7fcba016b3138d7beaa4e962853f9bc80f59438c)) ##### [1.3.3](https://togithub.com/googleapis/java-shared-config/compare/v1.3.2...v1.3.3) (2022-04-19) ##### Bug Fixes - **java:** remove protobuf feature from native profile ([#​461](https://togithub.com/googleapis/java-shared-config/issues/461)) ([ffd07cb](https://togithub.com/googleapis/java-shared-config/commit/ffd07cb18ee7d45d4daee1d9ea6f6d321fdca874)) ##### Dependencies - update dependency com.google.cloud:native-image-support to v0.12.11 ([#​459](https://togithub.com/googleapis/java-shared-config/issues/459)) ([d20008d](https://togithub.com/googleapis/java-shared-config/commit/d20008df15209708fdf9d06828b567778190f4d0)) - update dependency com.google.cloud:native-image-support to v0.13.1 ([#​465](https://togithub.com/googleapis/java-shared-config/issues/465)) ([b202064](https://togithub.com/googleapis/java-shared-config/commit/b2020648816feb4740ad70acedfed470d7da5bcf)) ##### [1.3.2](https://togithub.com/googleapis/java-shared-config/compare/v1.3.1...v1.3.2) (2022-03-28) ##### Dependencies - revert google-java-format to 1.7 ([#​453](https://togithub.com/googleapis/java-shared-config/issues/453)) ([cbc777f](https://togithub.com/googleapis/java-shared-config/commit/cbc777f3e9ab75edb6fa2e0268a7446ae4111725)) ##### [1.3.1](https://togithub.com/googleapis/java-shared-config/compare/v1.3.0...v1.3.1) (2022-03-25) ##### Dependencies - update dependency com.google.cloud:native-image-support to v0.12.10 ([#​443](https://togithub.com/googleapis/java-shared-config/issues/443)) ([5b39d5e](https://togithub.com/googleapis/java-shared-config/commit/5b39d5ee15121f052226ff873b6ab101e9c71de5)) - update dependency com.google.googlejavaformat:google-java-format to v1.15.0 ([#​426](https://togithub.com/googleapis/java-shared-config/issues/426)) ([4c3c4b6](https://togithub.com/googleapis/java-shared-config/commit/4c3c4b66129632181e6bc363a0ecccf4f5aac914)) - update dependency org.graalvm.buildtools:junit-platform-native to v0.9.11 ([#​448](https://togithub.com/googleapis/java-shared-config/issues/448)) ([f7f518e](https://togithub.com/googleapis/java-shared-config/commit/f7f518e87d1d9feb9ac54d7c099f97d8751ee3da)) - update dependency org.graalvm.buildtools:native-maven-plugin to v0.9.11 ([#​449](https://togithub.com/googleapis/java-shared-config/issues/449)) ([3e1c0b5](https://togithub.com/googleapis/java-shared-config/commit/3e1c0b5a1d2f4a0db88c06a0d683ed90cbc745e2))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 797c7821..1476885a 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.3.3 + 1.4.0 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index 509e2940..a5cf3192 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.3.3 + 1.4.0 From 7bde3da7b35f1e7dd58fbd12c242018c192087a7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 5 May 2022 01:30:13 +0200 Subject: [PATCH 108/203] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.3.0 (#211) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.2.2` -> `3.3.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/compatibility-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.3.0/confidence-slim/3.2.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index a5cf3192..02702690 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.2.2 + 3.3.0 From 76f48331d193fa30f62af289fd02684b3826e00d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 20:12:32 +0000 Subject: [PATCH 109/203] chore(deps): upgrade gapic-generator-java to 2.7.0 and update gax-java to 2.16.0 (#213) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 446250659 Source-Link: https://github.com/googleapis/googleapis/commit/dc4ef314fecf1b00833e78288cf2eb4d2b165ad1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/5fdda4ddfbab87998e77e4a453e0ff87986d2db8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWZkZGE0ZGRmYmFiODc5OThlNzdlNGE0NTNlMGZmODc5ODZkMmRiOCJ9 --- ...inauthzManagementServiceV1Beta1Client.java | 62 ++++++++++++++++++- ...authzManagementServiceV1Beta1Settings.java | 4 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 16 ++++- .../v1beta1/SystemPolicyV1Beta1Settings.java | 4 +- .../v1beta1/package-info.java | 6 +- .../BinauthzManagementServiceV1Beta1Stub.java | 2 +- ...zManagementServiceV1Beta1StubSettings.java | 4 +- ...nagementServiceV1Beta1CallableFactory.java | 2 +- ...cBinauthzManagementServiceV1Beta1Stub.java | 2 +- ...rpcSystemPolicyV1Beta1CallableFactory.java | 2 +- .../stub/GrpcSystemPolicyV1Beta1Stub.java | 2 +- .../v1beta1/stub/SystemPolicyV1Beta1Stub.java | 2 +- .../stub/SystemPolicyV1Beta1StubSettings.java | 4 +- .../v1/BinauthzManagementServiceV1Client.java | 62 ++++++++++++++++++- .../BinauthzManagementServiceV1Settings.java | 4 +- .../v1/SystemPolicyV1Client.java | 16 ++++- .../v1/SystemPolicyV1Settings.java | 4 +- .../v1/ValidationHelperV1Client.java | 12 +++- .../v1/ValidationHelperV1Settings.java | 4 +- .../binaryauthorization/v1/package-info.java | 8 ++- .../stub/BinauthzManagementServiceV1Stub.java | 2 +- ...nauthzManagementServiceV1StubSettings.java | 4 +- ...thzManagementServiceV1CallableFactory.java | 2 +- .../GrpcBinauthzManagementServiceV1Stub.java | 2 +- .../GrpcSystemPolicyV1CallableFactory.java | 2 +- .../v1/stub/GrpcSystemPolicyV1Stub.java | 2 +- ...GrpcValidationHelperV1CallableFactory.java | 2 +- .../v1/stub/GrpcValidationHelperV1Stub.java | 2 +- .../v1/stub/SystemPolicyV1Stub.java | 2 +- .../v1/stub/SystemPolicyV1StubSettings.java | 4 +- .../v1/stub/ValidationHelperV1Stub.java | 2 +- .../stub/ValidationHelperV1StubSettings.java | 4 +- ...thzManagementServiceV1Beta1ClientTest.java | 2 +- .../MockBinauthzManagementServiceV1Beta1.java | 2 +- ...kBinauthzManagementServiceV1Beta1Impl.java | 2 +- .../v1beta1/MockSystemPolicyV1Beta1.java | 2 +- .../v1beta1/MockSystemPolicyV1Beta1Impl.java | 2 +- .../SystemPolicyV1Beta1ClientTest.java | 2 +- ...BinauthzManagementServiceV1ClientTest.java | 2 +- .../v1/MockBinauthzManagementServiceV1.java | 2 +- .../MockBinauthzManagementServiceV1Impl.java | 2 +- .../v1/MockSystemPolicyV1.java | 2 +- .../v1/MockSystemPolicyV1Impl.java | 2 +- .../v1/MockValidationHelperV1.java | 2 +- .../v1/MockValidationHelperV1Impl.java | 2 +- .../v1/SystemPolicyV1ClientTest.java | 2 +- .../v1/ValidationHelperV1ClientTest.java | 2 +- .../binaryauthorization/v1/AttestorName.java | 2 +- .../binaryauthorization/v1/PolicyName.java | 2 +- .../binaryauthorization/v1/ProjectName.java | 2 +- .../v1beta1/AttestorName.java | 2 +- .../v1beta1/PolicyName.java | 2 +- .../v1beta1/ProjectName.java | 2 +- 53 files changed, 241 insertions(+), 53 deletions(-) diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index fd504420..63745435 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -1,5 +1,5 @@ /* - * Copyright 2021 Google LLC + * Copyright 2022 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,6 +50,8 @@ * calls that map to API methods. Sample code to get started: * *
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -87,6 +89,8 @@
  * 

To customize credentials: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
  *     BinauthzManagementServiceV1Beta1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -98,6 +102,8 @@
  * 

To customize the endpoint: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
  *     BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
@@ -179,6 +185,8 @@ public BinauthzManagementServiceV1Beta1Stub getStub() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -211,6 +219,8 @@ public final Policy getPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
@@ -242,6 +252,8 @@ public final Policy getPolicy(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetPolicyRequest request =
@@ -273,6 +285,8 @@ public final Policy getPolicy(GetPolicyRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetPolicyRequest request =
@@ -301,6 +315,8 @@ public final UnaryCallable getPolicyCallable() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   Policy policy = Policy.newBuilder().build();
@@ -330,6 +346,8 @@ public final Policy updatePolicy(Policy policy) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdatePolicyRequest request =
@@ -356,6 +374,8 @@ public final Policy updatePolicy(UpdatePolicyRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdatePolicyRequest request =
@@ -381,6 +401,8 @@ public final UnaryCallable updatePolicyCallable() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -421,6 +443,8 @@ public final Attestor createAttestor(ProjectName parent, String attestorId, Atte
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -461,6 +485,8 @@ public final Attestor createAttestor(String parent, String attestorId, Attestor
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   CreateAttestorRequest request =
@@ -490,6 +516,8 @@ public final Attestor createAttestor(CreateAttestorRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   CreateAttestorRequest request =
@@ -517,6 +545,8 @@ public final UnaryCallable createAttestorCallab
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -543,6 +573,8 @@ public final Attestor getAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -568,6 +600,8 @@ public final Attestor getAttestor(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetAttestorRequest request =
@@ -593,6 +627,8 @@ public final Attestor getAttestor(GetAttestorRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetAttestorRequest request =
@@ -618,6 +654,8 @@ public final UnaryCallable getAttestorCallable() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   Attestor attestor = Attestor.newBuilder().build();
@@ -645,6 +683,8 @@ public final Attestor updateAttestor(Attestor attestor) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdateAttestorRequest request =
@@ -668,6 +708,8 @@ public final Attestor updateAttestor(UpdateAttestorRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdateAttestorRequest request =
@@ -691,6 +733,8 @@ public final UnaryCallable updateAttestorCallab
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -722,6 +766,8 @@ public final ListAttestorsPagedResponse listAttestors(ProjectName parent) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -750,6 +796,8 @@ public final ListAttestorsPagedResponse listAttestors(String parent) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -780,6 +828,8 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -810,6 +860,8 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -846,6 +898,8 @@ public final UnaryCallable listAtte
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -872,6 +926,8 @@ public final void deleteAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -897,6 +953,8 @@ public final void deleteAttestor(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   DeleteAttestorRequest request =
@@ -922,6 +980,8 @@ public final void deleteAttestor(DeleteAttestorRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   DeleteAttestorRequest request =
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
index a088c822..1628c472 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,6 +54,8 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Beta1Settings.Builder
  *     binauthzManagementServiceV1Beta1SettingsBuilder =
  *         BinauthzManagementServiceV1Beta1Settings.newBuilder();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
index ae6effb1..4179be08 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -69,6 +71,8 @@
  * 

To customize credentials: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
  *     SystemPolicyV1Beta1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -80,6 +84,8 @@
  * 

To customize the endpoint: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
  *     SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
@@ -149,6 +155,8 @@ public SystemPolicyV1Beta1Stub getStub() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
    *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -172,6 +180,8 @@ public final Policy getSystemPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
    *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -194,6 +204,8 @@ public final Policy getSystemPolicy(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   GetSystemPolicyRequest request =
    *       GetSystemPolicyRequest.newBuilder()
@@ -217,6 +229,8 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   GetSystemPolicyRequest request =
    *       GetSystemPolicyRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
index c81c09d1..b23db1b3 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,6 +50,8 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder =
  *     SystemPolicyV1Beta1Settings.newBuilder();
  * systemPolicyV1Beta1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
index 5bf3f916..0b43613d 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -32,6 +32,8 @@
  * 

Sample for BinauthzManagementServiceV1Beta1Client: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -46,6 +48,8 @@
  * 

Sample for SystemPolicyV1Beta1Client: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java
index f597a924..e1107739 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
index 0a2c0f4c..87d464e7 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -79,6 +79,8 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Beta1StubSettings.Builder
  *     binauthzManagementServiceV1Beta1SettingsBuilder =
  *         BinauthzManagementServiceV1Beta1StubSettings.newBuilder();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java
index ae2d9046..9cfa95a1 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java
index 1a27b55a..afb534a6 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java
index bd636c07..a46689b3 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java
index 33bf36ce..94967d77 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java
index 4ecfc173..43efc4be 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
index a45e3cd8..22b913e1 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,6 +60,8 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
  *     SystemPolicyV1Beta1StubSettings.newBuilder();
  * systemPolicyV1Beta1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
index bbd24b07..6eae898d 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,6 +50,8 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
  *     BinauthzManagementServiceV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -87,6 +89,8 @@
  * 

To customize credentials: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
  *     BinauthzManagementServiceV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -98,6 +102,8 @@
  * 

To customize the endpoint: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
  *     BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
@@ -175,6 +181,8 @@ public BinauthzManagementServiceV1Stub getStub() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -208,6 +216,8 @@ public final Resources.Policy getPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
@@ -238,6 +248,8 @@ public final Resources.Policy getPolicy(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetPolicyRequest request =
@@ -268,6 +280,8 @@ public final Resources.Policy getPolicy(Service.GetPolicyRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetPolicyRequest request =
@@ -296,6 +310,8 @@ public final UnaryCallable getPolicy
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Resources.Policy policy = Resources.Policy.newBuilder().build();
@@ -326,6 +342,8 @@ public final Resources.Policy updatePolicy(Resources.Policy policy) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdatePolicyRequest request =
@@ -354,6 +372,8 @@ public final Resources.Policy updatePolicy(Service.UpdatePolicyRequest request)
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdatePolicyRequest request =
@@ -381,6 +401,8 @@ public final UnaryCallable update
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -421,6 +443,8 @@ public final Resources.Attestor createAttestor(
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -461,6 +485,8 @@ public final Resources.Attestor createAttestor(
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.CreateAttestorRequest request =
@@ -490,6 +516,8 @@ public final Resources.Attestor createAttestor(Service.CreateAttestorRequest req
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.CreateAttestorRequest request =
@@ -518,6 +546,8 @@ public final Resources.Attestor createAttestor(Service.CreateAttestorRequest req
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -545,6 +575,8 @@ public final Resources.Attestor getAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -570,6 +602,8 @@ public final Resources.Attestor getAttestor(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetAttestorRequest request =
@@ -595,6 +629,8 @@ public final Resources.Attestor getAttestor(Service.GetAttestorRequest request)
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetAttestorRequest request =
@@ -620,6 +656,8 @@ public final UnaryCallable getAt
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
@@ -647,6 +685,8 @@ public final Resources.Attestor updateAttestor(Resources.Attestor attestor) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdateAttestorRequest request =
@@ -672,6 +712,8 @@ public final Resources.Attestor updateAttestor(Service.UpdateAttestorRequest req
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdateAttestorRequest request =
@@ -698,6 +740,8 @@ public final Resources.Attestor updateAttestor(Service.UpdateAttestorRequest req
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -728,6 +772,8 @@ public final ListAttestorsPagedResponse listAttestors(ProjectName parent) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -756,6 +802,8 @@ public final ListAttestorsPagedResponse listAttestors(String parent) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -786,6 +834,8 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -816,6 +866,8 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -853,6 +905,8 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -880,6 +934,8 @@ public final void deleteAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -905,6 +961,8 @@ public final void deleteAttestor(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.DeleteAttestorRequest request =
@@ -930,6 +988,8 @@ public final void deleteAttestor(Service.DeleteAttestorRequest request) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.DeleteAttestorRequest request =
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
index e7a23f93..563d61c5 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -54,6 +54,8 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
  *     BinauthzManagementServiceV1Settings.newBuilder();
  * binauthzManagementServiceV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
index a4fe0c1f..fd8fa1dd 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -68,6 +70,8 @@
  * 

To customize credentials: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Settings systemPolicyV1Settings =
  *     SystemPolicyV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -78,6 +82,8 @@
  * 

To customize the endpoint: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Settings systemPolicyV1Settings =
  *     SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
@@ -145,6 +151,8 @@ public SystemPolicyV1Stub getStub() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
    *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -170,6 +178,8 @@ public final Resources.Policy getSystemPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
    *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -193,6 +203,8 @@ public final Resources.Policy getSystemPolicy(String name) {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   Service.GetSystemPolicyRequest request =
    *       Service.GetSystemPolicyRequest.newBuilder()
@@ -216,6 +228,8 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   Service.GetSystemPolicyRequest request =
    *       Service.GetSystemPolicyRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
index 1cfd8c98..1010ea02 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,6 +50,8 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
  *     SystemPolicyV1Settings.newBuilder();
  * systemPolicyV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
index af4f0634..c54b1d67 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,6 +33,8 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
  *   Service.ValidateAttestationOccurrenceRequest request =
  *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
@@ -76,6 +78,8 @@
  * 

To customize credentials: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * ValidationHelperV1Settings validationHelperV1Settings =
  *     ValidationHelperV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -87,6 +91,8 @@
  * 

To customize the endpoint: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * ValidationHelperV1Settings validationHelperV1Settings =
  *     ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * ValidationHelperV1Client validationHelperV1Client =
@@ -155,6 +161,8 @@ public ValidationHelperV1Stub getStub() {
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
    *   Service.ValidateAttestationOccurrenceRequest request =
    *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
@@ -183,6 +191,8 @@ public final Service.ValidateAttestationOccurrenceResponse validateAttestationOc
    * 

Sample code: * *

{@code
+   * // This snippet has been automatically generated for illustrative purposes only.
+   * // It may require modifications to work in your environment.
    * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
    *   Service.ValidateAttestationOccurrenceRequest request =
    *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
index b3adada0..d41bb953 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -50,6 +50,8 @@
  * 

For example, to set the total timeout of validateAttestationOccurrence to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
  *     ValidationHelperV1Settings.newBuilder();
  * validationHelperV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
index 3c020298..4e133d04 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,6 +34,8 @@
  * 

Sample for BinauthzManagementServiceV1Client: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
  *     BinauthzManagementServiceV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -48,6 +50,8 @@
  * 

Sample for SystemPolicyV1Client: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
  *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -61,6 +65,8 @@
  * 

Sample for ValidationHelperV1Client: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
  *   Service.ValidateAttestationOccurrenceRequest request =
  *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java
index a5f29095..9ebb4869 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
index e939c961..bb269765 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -71,6 +71,8 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
  *     BinauthzManagementServiceV1StubSettings.newBuilder();
  * binauthzManagementServiceV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java
index 5fc1fef3..74cba666 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java
index 87b697b2..8c7ae752 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java
index ee975437..6e35b13d 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java
index d804a683..1df22e1a 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java
index 097845f4..c870efbb 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java
index c990a23b..33f91e6d 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java
index 9d52db96..1431fc19 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
index 81a0de06..8c9ffc4e 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -60,6 +60,8 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder =
  *     SystemPolicyV1StubSettings.newBuilder();
  * systemPolicyV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java
index af7b3e0a..b02b3df3 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
index 1e45f510..0be42417 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -59,6 +59,8 @@
  * 

For example, to set the total timeout of validateAttestationOccurrence to 30 seconds: * *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
  * ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder =
  *     ValidationHelperV1StubSettings.newBuilder();
  * validationHelperV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java
index dc2a6ab8..1811efbd 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java
index 6eda6da5..4f306374 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java
index fae08155..cccfff48 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java
index 0facc763..9c5a53c6 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java
index 1d017ee4..c61ba91b 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java
index 0b610ca0..f5249ac5 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java
index f796cf02..83138a95 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java
index 441abf2e..794034b9 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java
index 43c5cbd3..6814eaef 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java
index eca15998..6e496637 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java
index b329f628..cf558665 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java
index 4c056166..0ccecad6 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java
index 31550b6b..32817078 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java
index dc4ccef1..4d5904b1 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java
index 1b06c6fa..d9254fdf 100644
--- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java
+++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java
index 1281ca73..9a37b606 100644
--- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java
+++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java
index 19f6f6a3..325af76b 100644
--- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java
+++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java
index c9062d3a..b38699d8 100644
--- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java
+++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java
index 450da7b8..429963e8 100644
--- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java
+++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java
index 68594ab0..c7bcff8d 100644
--- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java
+++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java
index 657e1a23..21950d05 100644
--- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java
+++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2021 Google LLC
+ * Copyright 2022 Google LLC
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.

From ba4ef80044ffcabba2d711ca2cb0e2c44ebbaded Mon Sep 17 00:00:00 2001
From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com>
Date: Thu, 19 May 2022 21:30:16 +0000
Subject: [PATCH 110/203] feat: add build scripts for native image testing in
 Java 17 (#1440) (#215)

Source-Link: https://github.com/googleapis/synthtool/commit/505ce5a7edb58bf6d9d4de10b4bb4e81000ae324
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74
---
 .github/.OwlBot.lock.yaml               |  4 +--
 .kokoro/build.sh                        |  5 ++++
 .kokoro/presubmit/graalvm-native-17.cfg | 33 +++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 2 deletions(-)
 create mode 100644 .kokoro/presubmit/graalvm-native-17.cfg

diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml
index 095b0d19..a79f0627 100644
--- a/.github/.OwlBot.lock.yaml
+++ b/.github/.OwlBot.lock.yaml
@@ -13,5 +13,5 @@
 # limitations under the License.
 docker:
   image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
-  digest: sha256:fc52b202aa298a50a12c64efd04fea3884d867947effe2fa85382a246c09e813
-# created: 2022-04-06T16:30:03.627422514Z
\ No newline at end of file
+  digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74
+# created: 2022-05-19T15:12:45.278246753Z
diff --git a/.kokoro/build.sh b/.kokoro/build.sh
index 4fe815fd..05993970 100755
--- a/.kokoro/build.sh
+++ b/.kokoro/build.sh
@@ -74,6 +74,11 @@ graalvm)
     mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
     RETURN_CODE=$?
     ;;
+graalvm17)
+    # Run Unit and Integration Tests with Native Image
+    mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test
+    RETURN_CODE=$?
+    ;;
 samples)
     SAMPLES_DIR=samples
     # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg
new file mode 100644
index 00000000..a3f7fb9d
--- /dev/null
+++ b/.kokoro/presubmit/graalvm-native-17.cfg
@@ -0,0 +1,33 @@
+# Format: //devtools/kokoro/config/proto/build.proto
+
+# Configure the docker image for kokoro-trampoline.
+env_vars: {
+  key: "TRAMPOLINE_IMAGE"
+  value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17"
+}
+
+env_vars: {
+  key: "JOB_TYPE"
+  value: "graalvm17"
+}
+
+# TODO: remove this after we've migrated all tests and scripts
+env_vars: {
+  key: "GCLOUD_PROJECT"
+  value: "gcloud-devel"
+}
+
+env_vars: {
+  key: "GOOGLE_CLOUD_PROJECT"
+  value: "gcloud-devel"
+}
+
+env_vars: {
+  key: "GOOGLE_APPLICATION_CREDENTIALS"
+  value: "secret_manager/java-it-service-account"
+}
+
+env_vars: {
+  key: "SECRET_MANAGER_KEYS"
+  value: "java-it-service-account"
+}
\ No newline at end of file

From 5d78ffc34c861786e73eb212f879065a6d7acf4a Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Mon, 23 May 2022 23:40:10 +0200
Subject: [PATCH 111/203] deps: update dependency
 com.google.cloud:google-cloud-shared-dependencies to v2.12.0 (#214)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.10.0` -> `2.12.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/compatibility-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.12.0/confidence-slim/2.10.0)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

googleapis/java-shared-dependencies ### [`v2.12.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2120-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2110v2120-2022-05-19) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.11.0...v2.12.0) ##### Features - add build scripts for native image testing in Java 17 ([#​1440](https://togithub.com/googleapis/java-shared-dependencies/issues/1440)) ([#​697](https://togithub.com/googleapis/java-shared-dependencies/issues/697)) ([f10ec4e](https://togithub.com/googleapis/java-shared-dependencies/commit/f10ec4e664d8fde868effe366b7182a5fad08dd0)) ##### Dependencies - update gax.version to v2.18.1 ([#​695](https://togithub.com/googleapis/java-shared-dependencies/issues/695)) ([09bc61c](https://togithub.com/googleapis/java-shared-dependencies/commit/09bc61c9152a99bfe87554a07324f15ae6217d6e)) - update google.core.version to v2.7.1 ([#​698](https://togithub.com/googleapis/java-shared-dependencies/issues/698)) ([43de259](https://togithub.com/googleapis/java-shared-dependencies/commit/43de2593f1a6e8fa5e34799364ab683246ddd449)) ### [`v2.11.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2110-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2100v2110-2022-05-18) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.10.0...v2.11.0) ##### Features - next release from main branch is 2.11.0 ([#​674](https://togithub.com/googleapis/java-shared-dependencies/issues/674)) ([611e3b7](https://togithub.com/googleapis/java-shared-dependencies/commit/611e3b7c50108a71efc94415166b85d2bf8647e5)) ##### Dependencies - update dependency com.fasterxml.jackson:jackson-bom to v2.13.3 ([#​689](https://togithub.com/googleapis/java-shared-dependencies/issues/689)) ([03897e3](https://togithub.com/googleapis/java-shared-dependencies/commit/03897e30a71f8f1aa37233da2433ee5afccc1d61)) - update dependency com.google.api-client:google-api-client-bom to v1.34.1 ([#​685](https://togithub.com/googleapis/java-shared-dependencies/issues/685)) ([9bc0557](https://togithub.com/googleapis/java-shared-dependencies/commit/9bc0557d8ce2f3d8dc7c8ffafdd36fd4c03e2df5)) - update dependency com.google.api:api-common to v2.2.0 ([#​690](https://togithub.com/googleapis/java-shared-dependencies/issues/690)) ([47a8736](https://togithub.com/googleapis/java-shared-dependencies/commit/47a87365e51f73132b15b054d85f8c9baa8e89f6)) - update dependency com.google.auth:google-auth-library-bom to v1.7.0 ([#​691](https://togithub.com/googleapis/java-shared-dependencies/issues/691)) ([ec6aab7](https://togithub.com/googleapis/java-shared-dependencies/commit/ec6aab72eaed43574efe47a696bba6a612f161bb)) - update dependency com.google.errorprone:error_prone_annotations to v2.13.1 ([#​672](https://togithub.com/googleapis/java-shared-dependencies/issues/672)) ([8c7e530](https://togithub.com/googleapis/java-shared-dependencies/commit/8c7e530d3c7170b2fb76cc27a05164524ba4e00b)) - update dependency com.google.http-client:google-http-client-bom to v1.41.8 ([#​684](https://togithub.com/googleapis/java-shared-dependencies/issues/684)) ([1305356](https://togithub.com/googleapis/java-shared-dependencies/commit/1305356775247dbb641b60654ac56da43513088e)) - update dependency com.google.protobuf:protobuf-bom to v3.20.1 ([#​678](https://togithub.com/googleapis/java-shared-dependencies/issues/678)) ([3e6d4a1](https://togithub.com/googleapis/java-shared-dependencies/commit/3e6d4a1a8e5d45723071a62c99bb1ab87d2b2b84)) - update dependency io.grpc:grpc-bom to v1.46.0 ([#​680](https://togithub.com/googleapis/java-shared-dependencies/issues/680)) ([b8a052b](https://togithub.com/googleapis/java-shared-dependencies/commit/b8a052b75a1bc2703500b4f31c5c6dac887ab8be)) - update dependency org.checkerframework:checker-qual to v3.22.0 ([#​683](https://togithub.com/googleapis/java-shared-dependencies/issues/683)) ([b0a30cd](https://togithub.com/googleapis/java-shared-dependencies/commit/b0a30cdecae8dcfb3a6d36e3f194c39a0086673e)) - update gax.version to v2.17.0 ([#​687](https://togithub.com/googleapis/java-shared-dependencies/issues/687)) ([e0e89ea](https://togithub.com/googleapis/java-shared-dependencies/commit/e0e89eade481effc723c9c7261f2ebf4e5883621)) - update gax.version to v2.18.0 ([#​692](https://togithub.com/googleapis/java-shared-dependencies/issues/692)) ([9536612](https://togithub.com/googleapis/java-shared-dependencies/commit/9536612c77af1e4d912c5b63515ea6f750e53810)) - update google.core.version to v2.6.1 ([#​671](https://togithub.com/googleapis/java-shared-dependencies/issues/671)) ([e3d1aeb](https://togithub.com/googleapis/java-shared-dependencies/commit/e3d1aebed31f8e91109d5865afd9525ac3595c90)) - update google.core.version to v2.7.0 ([#​693](https://togithub.com/googleapis/java-shared-dependencies/issues/693)) ([2171677](https://togithub.com/googleapis/java-shared-dependencies/commit/2171677e16190de9f37dc16c924d829ea8ccd86c)) - update iam.version to v1.3.2 ([#​673](https://togithub.com/googleapis/java-shared-dependencies/issues/673)) ([9882baa](https://togithub.com/googleapis/java-shared-dependencies/commit/9882baa3ecc8d7584788af1916f0d8c5ec670b5c)) - update iam.version to v1.3.3 ([#​679](https://togithub.com/googleapis/java-shared-dependencies/issues/679)) ([9fe34c8](https://togithub.com/googleapis/java-shared-dependencies/commit/9fe34c89eabed5eeebad986bffeeeb64dbbc38c1)) - update iam.version to v1.3.4 ([#​686](https://togithub.com/googleapis/java-shared-dependencies/issues/686)) ([4e95b3a](https://togithub.com/googleapis/java-shared-dependencies/commit/4e95b3a1d4302812338c220df316391c19ef7473)) - update opencensus.version to v0.31.1 ([#​682](https://togithub.com/googleapis/java-shared-dependencies/issues/682)) ([5d25746](https://togithub.com/googleapis/java-shared-dependencies/commit/5d25746bc6c9329b240204cbe7b83e2fee4c6cb3))
--- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 02702690..359c894e 100644 --- a/pom.xml +++ b/pom.xml @@ -88,11 +88,15 @@ grafeas 2.2.4 - + + io.perfmark + perfmark-api + 0.25.0 + com.google.cloud google-cloud-shared-dependencies - 2.10.0 + 2.12.0 pom import From b9f12042e3e2aa48e6a8d1268ac49328f34a80da Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 03:34:15 +0000 Subject: [PATCH 112/203] chore(main): release 1.1.0 (#216) :robot: I have created a release *beep* *boop* --- ## [1.1.0](https://github.com/googleapis/java-binary-authorization/compare/v1.0.9...v1.1.0) (2022-05-23) ### Features * add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/java-binary-authorization/issues/1440)) ([#215](https://github.com/googleapis/java-binary-authorization/issues/215)) ([ba4ef80](https://github.com/googleapis/java-binary-authorization/commit/ba4ef80044ffcabba2d711ca2cb0e2c44ebbaded)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#214](https://github.com/googleapis/java-binary-authorization/issues/214)) ([5d78ffc](https://github.com/googleapis/java-binary-authorization/commit/5d78ffc34c861786e73eb212f879065a6d7acf4a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 39 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b429680..e802988a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.1.0](https://github.com/googleapis/java-binary-authorization/compare/v1.0.9...v1.1.0) (2022-05-23) + + +### Features + +* add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/java-binary-authorization/issues/1440)) ([#215](https://github.com/googleapis/java-binary-authorization/issues/215)) ([ba4ef80](https://github.com/googleapis/java-binary-authorization/commit/ba4ef80044ffcabba2d711ca2cb0e2c44ebbaded)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#214](https://github.com/googleapis/java-binary-authorization/issues/214)) ([5d78ffc](https://github.com/googleapis/java-binary-authorization/commit/5d78ffc34c861786e73eb212f879065a6d7acf4a)) + ### [1.0.9](https://github.com/googleapis/java-binary-authorization/compare/v1.0.8...v1.0.9) (2022-04-18) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 1476885a..94a951f0 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.0.10-SNAPSHOT + 1.1.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.10-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 85042753..4f7ae147 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.0.10-SNAPSHOT + 1.1.0 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.0.10-SNAPSHOT + 1.1.0 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index c485466b..b6707135 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.10-SNAPSHOT + 1.1.0 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 9fa39255..0c403650 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.10-SNAPSHOT + 1.1.0 diff --git a/pom.xml b/pom.xml index 359c894e..be73786f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.0.10-SNAPSHOT + 1.1.0 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.0.10-SNAPSHOT + 1.1.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 09541732..618df978 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.0.10-SNAPSHOT + 1.1.0 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.10-SNAPSHOT + 1.1.0 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 2a97a4a2..0ded53eb 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.5.10-SNAPSHOT + 0.6.0 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.0.10-SNAPSHOT + 1.1.0 diff --git a/versions.txt b/versions.txt index 28de2115..ee8aefc2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.0.9:1.0.10-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.10-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.0.9:1.0.10-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.5.9:0.5.10-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.0.9:1.0.10-SNAPSHOT +google-cloud-binary-authorization:1.1.0:1.1.0 +grpc-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.0 +grpc-google-cloud-binary-authorization-v1:1.1.0:1.1.0 +proto-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.0 +proto-google-cloud-binary-authorization-v1:1.1.0:1.1.0 From 6fb679192b7186de6c63546a916f973c1f179903 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 24 May 2022 03:56:22 +0000 Subject: [PATCH 113/203] chore(main): release 1.1.1-SNAPSHOT (#219) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 94a951f0..c71094d6 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.1.0 + 1.1.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 4f7ae147..1f5954bf 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.1.0 + 1.1.1-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.1.0 + 1.1.1-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index b6707135..fb9e6795 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 0c403650..38461320 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index be73786f..80100db2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.1.0 + 1.1.1-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 618df978..7939e14f 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.0 + 1.1.1-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 0ded53eb..5e4b8753 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.0 + 0.6.1-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.0 + 1.1.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index ee8aefc2..0c0d59ff 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.1.0:1.1.0 -grpc-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.0 -grpc-google-cloud-binary-authorization-v1:1.1.0:1.1.0 -proto-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.0 -proto-google-cloud-binary-authorization-v1:1.1.0:1.1.0 +google-cloud-binary-authorization:1.1.0:1.1.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.1.0:1.1.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.1.0:1.1.1-SNAPSHOT From 901141fe7bb7250a14b1f8fd76d66b2be2331d45 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 26 May 2022 18:58:12 +0200 Subject: [PATCH 114/203] deps: update dependency io.grafeas:grafeas to v2.3.0 (#217) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.2.4` -> `2.3.0` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.0/compatibility-slim/2.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.0/confidence-slim/2.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 69c67a7e..379ceae4 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.0.9 + 1.1.0 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.0.9' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.1.0' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.0.9" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.1.0" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 80100db2..9609a28a 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.2.4 + 2.3.0 io.perfmark From 0009385f394e7b030a99a6b93240279e509958ff Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 17:12:12 +0000 Subject: [PATCH 115/203] chore(main): release 1.1.1 (#220) :robot: I have created a release *beep* *boop* --- ### [1.1.1](https://github.com/googleapis/java-binary-authorization/compare/v1.1.0...v1.1.1) (2022-05-26) ### Dependencies * update dependency io.grafeas:grafeas to v2.3.0 ([#217](https://github.com/googleapis/java-binary-authorization/issues/217)) ([901141f](https://github.com/googleapis/java-binary-authorization/commit/901141fe7bb7250a14b1f8fd76d66b2be2331d45)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e802988a..2515b5cb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [1.1.1](https://github.com/googleapis/java-binary-authorization/compare/v1.1.0...v1.1.1) (2022-05-26) + + +### Dependencies + +* update dependency io.grafeas:grafeas to v2.3.0 ([#217](https://github.com/googleapis/java-binary-authorization/issues/217)) ([901141f](https://github.com/googleapis/java-binary-authorization/commit/901141fe7bb7250a14b1f8fd76d66b2be2331d45)) + ## [1.1.0](https://github.com/googleapis/java-binary-authorization/compare/v1.0.9...v1.1.0) (2022-05-23) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index c71094d6..96783d8d 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.1.1-SNAPSHOT + 1.1.1 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.1-SNAPSHOT + 1.1.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 1f5954bf..ffd5af9d 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.1.1-SNAPSHOT + 1.1.1 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.1.1-SNAPSHOT + 1.1.1 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index fb9e6795..faafc550 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 38461320..322ba10f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/pom.xml b/pom.xml index 9609a28a..8d4416b2 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.1.1-SNAPSHOT + 1.1.1 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.1-SNAPSHOT + 1.1.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 7939e14f..d8f63018 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1-SNAPSHOT + 1.1.1 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 5e4b8753..99e8a6f9 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1-SNAPSHOT + 0.6.1 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1-SNAPSHOT + 1.1.1 diff --git a/versions.txt b/versions.txt index 0c0d59ff..0f89d7ca 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.1.0:1.1.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.1.0:1.1.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.6.0:0.6.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.1.0:1.1.1-SNAPSHOT +google-cloud-binary-authorization:1.1.1:1.1.1 +grpc-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.1 +grpc-google-cloud-binary-authorization-v1:1.1.1:1.1.1 +proto-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.1 +proto-google-cloud-binary-authorization-v1:1.1.1:1.1.1 From 6de1b0754d1512ff8f17e07908decebe6137708b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 17:22:21 +0000 Subject: [PATCH 116/203] chore(main): release 1.1.2-SNAPSHOT (#221) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 96783d8d..5d216d57 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.1.1 + 1.1.2-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.1 + 1.1.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index ffd5af9d..7737f183 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.1.1 + 1.1.2-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.1.1 + 1.1.2-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index faafc550..f6818d00 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1 + 1.1.2-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 322ba10f..14db1ddc 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1 + 1.1.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 8d4416b2..b8133590 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.1.1 + 1.1.2-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.1 + 1.1.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index d8f63018..ad4c99e9 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.1 + 1.1.2-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1 + 1.1.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 99e8a6f9..1da4d587 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.1 + 0.6.2-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.1 + 1.1.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 0f89d7ca..967742ed 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.1.1:1.1.1 -grpc-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.1 -grpc-google-cloud-binary-authorization-v1:1.1.1:1.1.1 -proto-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.1 -proto-google-cloud-binary-authorization-v1:1.1.1:1.1.1 +google-cloud-binary-authorization:1.1.1:1.1.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.1.1:1.1.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.1.1:1.1.2-SNAPSHOT From b8a10c1ccd2bbc4382a23d4d91b08a7d269c8367 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 27 May 2022 19:00:21 +0000 Subject: [PATCH 117/203] chore(deps): upgrade gapic-generator-java to 2.8.0 and update gax-java to 2.18.1 (#218) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 450543911 Source-Link: https://github.com/googleapis/googleapis/commit/55283447ab72f10b6c2571d770af0498b593e84f Source-Link: https://github.com/googleapis/googleapis-gen/commit/9f6775cab1958982b88967a43e5e806af0f135db Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWY2Nzc1Y2FiMTk1ODk4MmI4ODk2N2E0M2U1ZTgwNmFmMGYxMzVkYiJ9 --- .../v1beta1/BinauthzManagementServiceV1Beta1Client.java | 3 --- .../v1beta1/SystemPolicyV1Beta1Client.java | 3 --- .../stub/BinauthzManagementServiceV1Beta1StubSettings.java | 1 - .../v1beta1/stub/SystemPolicyV1Beta1StubSettings.java | 1 - .../v1/BinauthzManagementServiceV1Client.java | 4 ---- .../cloud/binaryauthorization/v1/SystemPolicyV1Client.java | 4 ---- .../binaryauthorization/v1/ValidationHelperV1Client.java | 4 ---- .../v1/stub/BinauthzManagementServiceV1StubSettings.java | 1 - .../v1/stub/SystemPolicyV1StubSettings.java | 1 - .../v1/stub/ValidationHelperV1StubSettings.java | 1 - 10 files changed, 23 deletions(-) diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index 63745435..fccbdb57 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -138,7 +138,6 @@ public static final BinauthzManagementServiceV1Beta1Client create( * making calls. This is for advanced usage - prefer using * create(BinauthzManagementServiceV1Beta1Settings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final BinauthzManagementServiceV1Beta1Client create( BinauthzManagementServiceV1Beta1Stub stub) { return new BinauthzManagementServiceV1Beta1Client(stub); @@ -156,7 +155,6 @@ protected BinauthzManagementServiceV1Beta1Client( ((BinauthzManagementServiceV1Beta1StubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected BinauthzManagementServiceV1Beta1Client(BinauthzManagementServiceV1Beta1Stub stub) { this.settings = null; this.stub = stub; @@ -166,7 +164,6 @@ public final BinauthzManagementServiceV1Beta1Settings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BinauthzManagementServiceV1Beta1Stub getStub() { return stub; } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java index 4179be08..97668fc9 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -118,7 +118,6 @@ public static final SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Settings * Constructs an instance of SystemPolicyV1Beta1Client, using the given stub for making calls. * This is for advanced usage - prefer using create(SystemPolicyV1Beta1Settings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Stub stub) { return new SystemPolicyV1Beta1Client(stub); } @@ -133,7 +132,6 @@ protected SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Settings settings) throws this.stub = ((SystemPolicyV1Beta1StubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Stub stub) { this.settings = null; this.stub = stub; @@ -143,7 +141,6 @@ public final SystemPolicyV1Beta1Settings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public SystemPolicyV1Beta1Stub getStub() { return stub; } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java index 87d464e7..1e95f878 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java @@ -204,7 +204,6 @@ public UnaryCallSettings deleteAttestorSettings() return deleteAttestorSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BinauthzManagementServiceV1Beta1Stub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java index 22b913e1..a5ba7c01 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java @@ -91,7 +91,6 @@ public UnaryCallSettings getSystemPolicySettings return getSystemPolicySettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public SystemPolicyV1Beta1Stub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java index 6eae898d..e754f330 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -18,7 +18,6 @@ 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; @@ -136,7 +135,6 @@ public static final BinauthzManagementServiceV1Client create( * Constructs an instance of BinauthzManagementServiceV1Client, using the given stub for making * calls. This is for advanced usage - prefer using create(BinauthzManagementServiceV1Settings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final BinauthzManagementServiceV1Client create( BinauthzManagementServiceV1Stub stub) { return new BinauthzManagementServiceV1Client(stub); @@ -153,7 +151,6 @@ protected BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Settings this.stub = ((BinauthzManagementServiceV1StubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Stub stub) { this.settings = null; this.stub = stub; @@ -163,7 +160,6 @@ public final BinauthzManagementServiceV1Settings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BinauthzManagementServiceV1Stub getStub() { return stub; } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java index fd8fa1dd..c0d107b0 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -16,7 +16,6 @@ package com.google.protos.google.cloud.binaryauthorization.v1; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1Stub; @@ -114,7 +113,6 @@ public static final SystemPolicyV1Client create(SystemPolicyV1Settings settings) * Constructs an instance of SystemPolicyV1Client, using the given stub for making calls. This is * for advanced usage - prefer using create(SystemPolicyV1Settings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final SystemPolicyV1Client create(SystemPolicyV1Stub stub) { return new SystemPolicyV1Client(stub); } @@ -129,7 +127,6 @@ protected SystemPolicyV1Client(SystemPolicyV1Settings settings) throws IOExcepti this.stub = ((SystemPolicyV1StubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected SystemPolicyV1Client(SystemPolicyV1Stub stub) { this.settings = null; this.stub = stub; @@ -139,7 +136,6 @@ public final SystemPolicyV1Settings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public SystemPolicyV1Stub getStub() { return stub; } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java index c54b1d67..7375f421 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java @@ -16,7 +16,6 @@ package com.google.protos.google.cloud.binaryauthorization.v1; -import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; import com.google.api.gax.rpc.UnaryCallable; import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1Stub; @@ -124,7 +123,6 @@ public static final ValidationHelperV1Client create(ValidationHelperV1Settings s * Constructs an instance of ValidationHelperV1Client, using the given stub for making calls. This * is for advanced usage - prefer using create(ValidationHelperV1Settings). */ - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public static final ValidationHelperV1Client create(ValidationHelperV1Stub stub) { return new ValidationHelperV1Client(stub); } @@ -139,7 +137,6 @@ protected ValidationHelperV1Client(ValidationHelperV1Settings settings) throws I this.stub = ((ValidationHelperV1StubSettings) settings.getStubSettings()).createStub(); } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected ValidationHelperV1Client(ValidationHelperV1Stub stub) { this.settings = null; this.stub = stub; @@ -149,7 +146,6 @@ public final ValidationHelperV1Settings getSettings() { return settings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public ValidationHelperV1Stub getStub() { return stub; } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java index bb269765..47ddca33 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java @@ -212,7 +212,6 @@ public UnaryCallSettings deleteAttestorSet return deleteAttestorSettings; } - @BetaApi("A restructuring of stub classes is planned, so this may break in the future") public BinauthzManagementServiceV1Stub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java index 8c9ffc4e..5c459673 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java @@ -91,7 +91,6 @@ public class SystemPolicyV1StubSettings extends StubSettings Date: Mon, 13 Jun 2022 19:02:27 +0200 Subject: [PATCH 118/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.0 (#226) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.4.0` -> `1.5.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/compatibility-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.0/confidence-slim/1.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 379ceae4..fb726425 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.1.0 + 1.1.1 ``` If you are using Gradle without BOM, add this to your dependencies ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.1.0' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.1.1' ``` If you are using SBT, add this to your dependencies ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.1.0" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.1.1" ``` ## Authentication diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 5d216d57..09588b87 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index b8133590..399a6e49 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.4.0 + 1.5.0 From bb477621b3634b9fc7d0cfd3f7749a0b810427f5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 13 Jun 2022 20:16:25 +0000 Subject: [PATCH 119/203] chore: Integrate new gapic-generator-java and rules_gapic (#223) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 454027580 Source-Link: https://github.com/googleapis/googleapis/commit/1b222777baa702e7135610355706570ed2b56318 Source-Link: https://github.com/googleapis/googleapis-gen/commit/e04cea20d0d12eb5c3bdb360a9e72b654edcb638 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZTA0Y2VhMjBkMGQxMmViNWMzYmRiMzYwYTllNzJiNjU0ZWRjYjYzOCJ9 --- .../v1beta1/BinauthzManagementServiceV1Beta1Client.java | 2 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 8 ++++---- .../cloud/binaryauthorization/v1beta1/package-info.java | 2 +- .../v1/BinauthzManagementServiceV1Client.java | 2 +- .../binaryauthorization/v1/SystemPolicyV1Client.java | 8 ++++---- .../google/cloud/binaryauthorization/v1/package-info.java | 2 +- .../v1beta1/SystemPolicyV1Beta1ClientTest.java | 8 ++++---- .../binaryauthorization/v1/SystemPolicyV1ClientTest.java | 8 ++++---- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index fccbdb57..ca587ae1 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -870,7 +870,7 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque * while (true) { * ListAttestorsResponse response = * binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request); - * for (Attestor element : response.getResponsesList()) { + * for (Attestor element : response.getAttestorsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java index 97668fc9..5fb4e062 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -36,7 +36,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * }
@@ -155,7 +155,7 @@ public SystemPolicyV1Beta1Stub getStub() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * }
@@ -206,7 +206,7 @@ public final Policy getSystemPolicy(String name) { * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { * GetSystemPolicyRequest request = * GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request); * } @@ -231,7 +231,7 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) { * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { * GetSystemPolicyRequest request = * GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * ApiFuture future = * systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request); diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java index 0b43613d..c9ab463f 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java @@ -51,7 +51,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); * } * }
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java index e754f330..dce518a8 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -875,7 +875,7 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque * while (true) { * Service.ListAttestorsResponse response = * binauthzManagementServiceV1Client.listAttestorsCallable().call(request); - * for (Resources.Attestor element : response.getResponsesList()) { + * for (Resources.Attestor element : response.getAttestorsList()) { * // doThingsWith(element); * } * String nextPageToken = response.getNextPageToken(); diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java index c0d107b0..c55d857e 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -35,7 +35,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * }
@@ -150,7 +150,7 @@ public SystemPolicyV1Stub getStub() { * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * }
@@ -204,7 +204,7 @@ public final Resources.Policy getSystemPolicy(String name) { * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { * Service.GetSystemPolicyRequest request = * Service.GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request); * } @@ -229,7 +229,7 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { * Service.GetSystemPolicyRequest request = * Service.GetSystemPolicyRequest.newBuilder() - * .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + * .setName(PolicyName.ofLocationName("[LOCATION]").toString()) * .build(); * ApiFuture future = * systemPolicyV1Client.getSystemPolicyCallable().futureCall(request); diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java index 4e133d04..62b205e3 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java @@ -53,7 +53,7 @@ * // This snippet has been automatically generated for illustrative purposes only. * // It may require modifications to work in your environment. * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - * PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + * PolicyName name = PolicyName.ofLocationName("[LOCATION]"); * Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); * } * }
diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java index f5249ac5..01d53e3b 100644 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java @@ -82,7 +82,7 @@ public void tearDown() throws Exception { public void getSystemPolicyTest() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) @@ -94,7 +94,7 @@ public void getSystemPolicyTest() throws Exception { .build(); mockSystemPolicyV1Beta1.addResponse(expectedResponse); - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); Policy actualResponse = client.getSystemPolicy(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -116,7 +116,7 @@ public void getSystemPolicyExceptionTest() throws Exception { mockSystemPolicyV1Beta1.addException(exception); try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); client.getSystemPolicy(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -128,7 +128,7 @@ public void getSystemPolicyExceptionTest() throws Exception { public void getSystemPolicyTest2() throws Exception { Policy expectedResponse = Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java index 4d5904b1..4be86f68 100644 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java @@ -82,7 +82,7 @@ public void tearDown() throws Exception { public void getSystemPolicyTest() throws Exception { Resources.Policy expectedResponse = Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) @@ -96,7 +96,7 @@ public void getSystemPolicyTest() throws Exception { .build(); mockSystemPolicyV1.addResponse(expectedResponse); - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); Resources.Policy actualResponse = client.getSystemPolicy(name); Assert.assertEquals(expectedResponse, actualResponse); @@ -119,7 +119,7 @@ public void getSystemPolicyExceptionTest() throws Exception { mockSystemPolicyV1.addException(exception); try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); client.getSystemPolicy(name); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { @@ -131,7 +131,7 @@ public void getSystemPolicyExceptionTest() throws Exception { public void getSystemPolicyTest2() throws Exception { Resources.Policy expectedResponse = Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) .setDescription("description-1724546052") .addAllAdmissionWhitelistPatterns(new ArrayList()) .putAllClusterAdmissionRules(new HashMap()) From 3b87721e496edf026fc5b5914c459eee3e73b24b Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 14 Jun 2022 21:22:20 +0000 Subject: [PATCH 120/203] chore: skip formatting generated samples (#1456) (#224) Source-Link: https://github.com/googleapis/synthtool/commit/625c20e6b9e195986595e56f60cba04e99c1951a Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:58ccd4737212f64a7dd4b3063d447447acf71a2b9d409eab19fc7a00b18eadc0 --- .github/.OwlBot.lock.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a79f0627..68f2b159 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:2567a120ce90fadb6201999b87d649d9f67459de28815ad239bce9ebfaa18a74 -# created: 2022-05-19T15:12:45.278246753Z + digest: sha256:58ccd4737212f64a7dd4b3063d447447acf71a2b9d409eab19fc7a00b18eadc0 +# created: 2022-06-10T19:20:11.004014696Z From d8fddd93593269ff53794565337601f9f8ffc836 Mon Sep 17 00:00:00 2001 From: Emily Ball Date: Tue, 14 Jun 2022 21:40:21 +0000 Subject: [PATCH 121/203] chore: include generated samples dir (#225) --- .github/.OwlBot.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml index 21a244ba..34ce36f5 100644 --- a/.github/.OwlBot.yaml +++ b/.github/.OwlBot.yaml @@ -16,6 +16,7 @@ docker: image: "gcr.io/cloud-devrel-public-resources/owlbot-java:latest" deep-remove-regex: +- "/samples/snippets/generated" - "/grpc-google-.*/src" - "/proto-google-.*/src" - "/google-.*/src" @@ -26,4 +27,6 @@ deep-copy-regex: - source: "/google/cloud/binaryauthorization/(v.*)/.*-java/grpc-google-.*/src" dest: "/owl-bot-staging/$1/grpc-google-cloud-binary-authorization-$1/src" - source: "/google/cloud/binaryauthorization/(v.*)/.*-java/gapic-google-.*/src" - dest: "/owl-bot-staging/$1/google-cloud-binary-authorization/src" \ No newline at end of file + dest: "/owl-bot-staging/$1/google-cloud-binary-authorization/src" +- source: "/google/cloud/binaryauthorization/(v.*)/.*-java/samples/snippets/generated" + dest: "/owl-bot-staging/$1/samples/snippets/generated" From 4755125936bcf5931ea01e01e9fc6af3a7c1c309 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 21 Jun 2022 16:22:21 +0000 Subject: [PATCH 122/203] feat: Adds a pod_namespace field to pod events created by Continuous Validation, to distinguish pods with the same name that run in different namespaces (#227) - [ ] Regenerate this pull request now. Committer: @tswift242 PiperOrigin-RevId: 455380856 Source-Link: https://github.com/googleapis/googleapis/commit/1cbacff2f2fe932f91a39d7c1538cb1afc50bd89 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cb47adfa214e798ee1cb736b52ad386101b096e0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2I0N2FkZmEyMTRlNzk4ZWUxY2I3MzZiNTJhZDM4NjEwMWIwOTZlMCJ9 --- .../v1beta1/ContinuousValidationEvent.java | 204 ++++++++++++++++++ .../ContinuousValidationLoggingProto.java | 64 +++--- .../continuous_validation_logging.proto | 21 +- .../SyncCreateSetCredentialsProvider.java | 42 ++++ .../create/SyncCreateSetEndpoint.java | 39 ++++ .../createattestor/AsyncCreateAttestor.java | 50 +++++ .../createattestor/SyncCreateAttestor.java | 46 ++++ ...eateAttestorProjectnameStringAttestor.java | 43 ++++ ...yncCreateAttestorStringStringAttestor.java | 43 ++++ .../deleteattestor/AsyncDeleteAttestor.java | 48 +++++ .../deleteattestor/SyncDeleteAttestor.java | 44 ++++ .../SyncDeleteAttestorAttestorname.java | 40 ++++ .../SyncDeleteAttestorString.java | 40 ++++ .../getattestor/AsyncGetAttestor.java | 48 +++++ .../getattestor/SyncGetAttestor.java | 44 ++++ .../SyncGetAttestorAttestorname.java | 40 ++++ .../getattestor/SyncGetAttestorString.java | 40 ++++ .../getpolicy/AsyncGetPolicy.java | 48 +++++ .../getpolicy/SyncGetPolicy.java | 44 ++++ .../getpolicy/SyncGetPolicyPolicyname.java | 40 ++++ .../getpolicy/SyncGetPolicyString.java | 40 ++++ .../listattestors/AsyncListAttestors.java | 52 +++++ .../AsyncListAttestorsPaged.java | 60 ++++++ .../listattestors/SyncListAttestors.java | 49 +++++ .../SyncListAttestorsProjectname.java | 43 ++++ .../SyncListAttestorsString.java | 43 ++++ .../updateattestor/AsyncUpdateAttestor.java | 45 ++++ .../updateattestor/SyncUpdateAttestor.java | 41 ++++ .../SyncUpdateAttestorAttestor.java | 39 ++++ .../updatepolicy/AsyncUpdatePolicy.java | 45 ++++ .../updatepolicy/SyncUpdatePolicy.java | 41 ++++ .../updatepolicy/SyncUpdatePolicyPolicy.java | 39 ++++ .../getpolicy/SyncGetPolicy.java | 48 +++++ .../getpolicy/SyncGetPolicy.java | 48 +++++ .../getsystempolicy/SyncGetSystemPolicy.java | 47 ++++ .../SyncCreateSetCredentialsProvider.java | 42 ++++ .../create/SyncCreateSetEndpoint.java | 39 ++++ .../getsystempolicy/AsyncGetSystemPolicy.java | 47 ++++ .../getsystempolicy/SyncGetSystemPolicy.java | 43 ++++ .../SyncGetSystemPolicyPolicyname.java | 39 ++++ .../SyncGetSystemPolicyString.java | 39 ++++ .../getsystempolicy/SyncGetSystemPolicy.java | 47 ++++ .../SyncCreateSetCredentialsProvider.java | 42 ++++ .../create/SyncCreateSetEndpoint.java | 39 ++++ .../createattestor/AsyncCreateAttestor.java | 50 +++++ .../createattestor/SyncCreateAttestor.java | 46 ++++ ...torProjectnameStringResourcesattestor.java | 43 ++++ ...AttestorStringStringResourcesattestor.java | 43 ++++ .../deleteattestor/AsyncDeleteAttestor.java | 48 +++++ .../deleteattestor/SyncDeleteAttestor.java | 44 ++++ .../SyncDeleteAttestorAttestorname.java | 40 ++++ .../SyncDeleteAttestorString.java | 40 ++++ .../getattestor/AsyncGetAttestor.java | 48 +++++ .../getattestor/SyncGetAttestor.java | 44 ++++ .../SyncGetAttestorAttestorname.java | 40 ++++ .../getattestor/SyncGetAttestorString.java | 40 ++++ .../getpolicy/AsyncGetPolicy.java | 48 +++++ .../getpolicy/SyncGetPolicy.java | 44 ++++ .../getpolicy/SyncGetPolicyPolicyname.java | 40 ++++ .../getpolicy/SyncGetPolicyString.java | 40 ++++ .../listattestors/AsyncListAttestors.java | 52 +++++ .../AsyncListAttestorsPaged.java | 59 +++++ .../listattestors/SyncListAttestors.java | 49 +++++ .../SyncListAttestorsProjectname.java | 43 ++++ .../SyncListAttestorsString.java | 43 ++++ .../updateattestor/AsyncUpdateAttestor.java | 47 ++++ .../updateattestor/SyncUpdateAttestor.java | 43 ++++ .../SyncUpdateAttestorResourcesattestor.java | 39 ++++ .../updatepolicy/AsyncUpdatePolicy.java | 47 ++++ .../updatepolicy/SyncUpdatePolicy.java | 43 ++++ .../SyncUpdatePolicyResourcespolicy.java | 39 ++++ .../getpolicy/SyncGetPolicy.java | 47 ++++ .../getpolicy/SyncGetPolicy.java | 47 ++++ .../getsystempolicy/SyncGetSystemPolicy.java | 46 ++++ .../SyncValidateAttestationOccurrence.java | 47 ++++ .../SyncCreateSetCredentialsProvider.java | 41 ++++ .../create/SyncCreateSetEndpoint.java | 38 ++++ .../getsystempolicy/AsyncGetSystemPolicy.java | 47 ++++ .../getsystempolicy/SyncGetSystemPolicy.java | 43 ++++ .../SyncGetSystemPolicyPolicyname.java | 39 ++++ .../SyncGetSystemPolicyString.java | 39 ++++ .../getsystempolicy/SyncGetSystemPolicy.java | 46 ++++ .../SyncCreateSetCredentialsProvider.java | 42 ++++ .../create/SyncCreateSetEndpoint.java | 39 ++++ .../AsyncValidateAttestationOccurrence.java | 49 +++++ .../SyncValidateAttestationOccurrence.java | 46 ++++ .../SyncValidateAttestationOccurrence.java | 47 ++++ 87 files changed, 3949 insertions(+), 41 deletions(-) create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java index e3511994..4f694d1f 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java @@ -163,6 +163,31 @@ public interface ContinuousValidationPodEventOrBuilder // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) com.google.protobuf.MessageOrBuilder { + /** + * + * + *
+     * The k8s namespace of the Pod.
+     * 
+ * + * string pod_namespace = 7; + * + * @return The podNamespace. + */ + java.lang.String getPodNamespace(); + /** + * + * + *
+     * The k8s namespace of the Pod.
+     * 
+ * + * string pod_namespace = 7; + * + * @return The bytes for podNamespace. + */ + com.google.protobuf.ByteString getPodNamespaceBytes(); + /** * * @@ -384,6 +409,7 @@ private ContinuousValidationPodEvent( } private ContinuousValidationPodEvent() { + podNamespace_ = ""; pod_ = ""; verdict_ = 0; images_ = java.util.Collections.emptyList(); @@ -479,6 +505,13 @@ private ContinuousValidationPodEvent( extensionRegistry)); break; } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + podNamespace_ = s; + break; + } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { @@ -1977,6 +2010,55 @@ public com.google.protobuf.Parser getParserForType() { } } + public static final int POD_NAMESPACE_FIELD_NUMBER = 7; + private volatile java.lang.Object podNamespace_; + /** + * + * + *
+     * The k8s namespace of the Pod.
+     * 
+ * + * string pod_namespace = 7; + * + * @return The podNamespace. + */ + @java.lang.Override + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } + } + /** + * + * + *
+     * The k8s namespace of the Pod.
+     * 
+ * + * string pod_namespace = 7; + * + * @return The bytes for podNamespace. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + public static final int POD_FIELD_NUMBER = 1; private volatile java.lang.Object pod_; /** @@ -2291,6 +2373,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < images_.size(); i++) { output.writeMessage(5, images_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, podNamespace_); + } unknownFields.writeTo(output); } @@ -2319,6 +2404,9 @@ public int getSerializedSize() { for (int i = 0; i < images_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, images_.get(i)); } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, podNamespace_); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -2342,6 +2430,7 @@ public boolean equals(final java.lang.Object obj) { .ContinuousValidationPodEvent) obj; + if (!getPodNamespace().equals(other.getPodNamespace())) return false; if (!getPod().equals(other.getPod())) return false; if (hasDeployTime() != other.hasDeployTime()) return false; if (hasDeployTime()) { @@ -2364,6 +2453,8 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + POD_NAMESPACE_FIELD_NUMBER; + hash = (53 * hash) + getPodNamespace().hashCode(); hash = (37 * hash) + POD_FIELD_NUMBER; hash = (53 * hash) + getPod().hashCode(); if (hasDeployTime()) { @@ -2555,6 +2646,8 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); + podNamespace_ = ""; + pod_ = ""; if (deployTimeBuilder_ == null) { @@ -2617,6 +2710,7 @@ public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent .ContinuousValidationPodEvent(this); int from_bitField0_ = bitField0_; + result.podNamespace_ = podNamespace_; result.pod_ = pod_; if (deployTimeBuilder_ == null) { result.deployTime_ = deployTime_; @@ -2700,6 +2794,10 @@ public Builder mergeFrom( if (other == com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent .ContinuousValidationPodEvent.getDefaultInstance()) return this; + if (!other.getPodNamespace().isEmpty()) { + podNamespace_ = other.podNamespace_; + onChanged(); + } if (!other.getPod().isEmpty()) { pod_ = other.pod_; onChanged(); @@ -2776,6 +2874,112 @@ public Builder mergeFrom( private int bitField0_; + private java.lang.Object podNamespace_ = ""; + /** + * + * + *
+       * The k8s namespace of the Pod.
+       * 
+ * + * string pod_namespace = 7; + * + * @return The podNamespace. + */ + public java.lang.String getPodNamespace() { + java.lang.Object ref = podNamespace_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + podNamespace_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The k8s namespace of the Pod.
+       * 
+ * + * string pod_namespace = 7; + * + * @return The bytes for podNamespace. + */ + public com.google.protobuf.ByteString getPodNamespaceBytes() { + java.lang.Object ref = podNamespace_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + podNamespace_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The k8s namespace of the Pod.
+       * 
+ * + * string pod_namespace = 7; + * + * @param value The podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespace(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + podNamespace_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The k8s namespace of the Pod.
+       * 
+ * + * string pod_namespace = 7; + * + * @return This builder for chaining. + */ + public Builder clearPodNamespace() { + + podNamespace_ = getDefaultInstance().getPodNamespace(); + onChanged(); + return this; + } + /** + * + * + *
+       * The k8s namespace of the Pod.
+       * 
+ * + * string pod_namespace = 7; + * + * @param value The bytes for podNamespace to set. + * @return This builder for chaining. + */ + public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + podNamespace_ = value; + onChanged(); + return this; + } + private java.lang.Object pod_ = ""; /** * diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java index 7d29c3d0..8c94cdeb 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java @@ -55,43 +55,43 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "\nLgoogle/cloud/binaryauthorization/v1bet" + "a1/continuous_validation_logging.proto\022(" + "google.cloud.binaryauthorization.v1beta1" - + "\032\037google/protobuf/timestamp.proto\"\310\010\n\031Co" + + "\032\037google/protobuf/timestamp.proto\"\337\010\n\031Co" + "ntinuousValidationEvent\022u\n\tpod_event\030\001 \001" + "(\0132`.google.cloud.binaryauthorization.v1" + "beta1.ContinuousValidationEvent.Continuo" + "usValidationPodEventH\000\022~\n\030unsupported_po" + "licy_event\030\002 \001(\0132Z.google.cloud.binaryau" + "thorization.v1beta1.ContinuousValidation" - + "Event.UnsupportedPolicyEventH\000\032\366\005\n\034Conti" - + "nuousValidationPodEvent\022\013\n\003pod\030\001 \001(\t\022/\n\013" - + "deploy_time\030\002 \001(\0132\032.google.protobuf.Time" - + "stamp\022,\n\010end_time\030\003 \001(\0132\032.google.protobu" - + "f.Timestamp\022\212\001\n\007verdict\030\004 \001(\0162y.google.c" - + "loud.binaryauthorization.v1beta1.Continu" - + "ousValidationEvent.ContinuousValidationP" - + "odEvent.PolicyConformanceVerdict\022}\n\006imag" - + "es\030\005 \003(\0132m.google.cloud.binaryauthorizat" - + "ion.v1beta1.ContinuousValidationEvent.Co" - + "ntinuousValidationPodEvent.ImageDetails\032" - + "\200\002\n\014ImageDetails\022\r\n\005image\030\001 \001(\t\022\211\001\n\006resu" - + "lt\030\002 \001(\0162y.google.cloud.binaryauthorizat" - + "ion.v1beta1.ContinuousValidationEvent.Co" - + "ntinuousValidationPodEvent.ImageDetails." - + "AuditResult\022\023\n\013description\030\003 \001(\t\"@\n\013Audi" - + "tResult\022\034\n\030AUDIT_RESULT_UNSPECIFIED\020\000\022\t\n" - + "\005ALLOW\020\001\022\010\n\004DENY\020\002\"[\n\030PolicyConformanceV" - + "erdict\022*\n&POLICY_CONFORMANCE_VERDICT_UNS" - + "PECIFIED\020\000\022\023\n\017VIOLATES_POLICY\020\001\032-\n\026Unsup" - + "portedPolicyEvent\022\023\n\013description\030\001 \001(\tB\014" - + "\n\nevent_typeB\266\002\n,com.google.cloud.binary" - + "authorization.v1beta1B ContinuousValidat" - + "ionLoggingProtoP\001Z[google.golang.org/gen" - + "proto/googleapis/cloud/binaryauthorizati" - + "on/v1beta1;binaryauthorization\370\001\001\252\002(Goog" - + "le.Cloud.BinaryAuthorization.V1Beta1\312\002(G" - + "oogle\\Cloud\\BinaryAuthorization\\V1beta1\352" - + "\002+Google::Cloud::BinaryAuthorization::V1" - + "beta1b\006proto3" + + "Event.UnsupportedPolicyEventH\000\032\215\006\n\034Conti" + + "nuousValidationPodEvent\022\025\n\rpod_namespace" + + "\030\007 \001(\t\022\013\n\003pod\030\001 \001(\t\022/\n\013deploy_time\030\002 \001(\013" + + "2\032.google.protobuf.Timestamp\022,\n\010end_time" + + "\030\003 \001(\0132\032.google.protobuf.Timestamp\022\212\001\n\007v" + + "erdict\030\004 \001(\0162y.google.cloud.binaryauthor" + + "ization.v1beta1.ContinuousValidationEven" + + "t.ContinuousValidationPodEvent.PolicyCon" + + "formanceVerdict\022}\n\006images\030\005 \003(\0132m.google" + + ".cloud.binaryauthorization.v1beta1.Conti" + + "nuousValidationEvent.ContinuousValidatio" + + "nPodEvent.ImageDetails\032\200\002\n\014ImageDetails\022" + + "\r\n\005image\030\001 \001(\t\022\211\001\n\006result\030\002 \001(\0162y.google" + + ".cloud.binaryauthorization.v1beta1.Conti" + + "nuousValidationEvent.ContinuousValidatio" + + "nPodEvent.ImageDetails.AuditResult\022\023\n\013de" + + "scription\030\003 \001(\t\"@\n\013AuditResult\022\034\n\030AUDIT_" + + "RESULT_UNSPECIFIED\020\000\022\t\n\005ALLOW\020\001\022\010\n\004DENY\020" + + "\002\"[\n\030PolicyConformanceVerdict\022*\n&POLICY_" + + "CONFORMANCE_VERDICT_UNSPECIFIED\020\000\022\023\n\017VIO" + + "LATES_POLICY\020\001\032-\n\026UnsupportedPolicyEvent" + + "\022\023\n\013description\030\001 \001(\tB\014\n\nevent_typeB\266\002\n," + + "com.google.cloud.binaryauthorization.v1b" + + "eta1B ContinuousValidationLoggingProtoP\001" + + "Z[google.golang.org/genproto/googleapis/" + + "cloud/binaryauthorization/v1beta1;binary" + + "authorization\370\001\001\252\002(Google.Cloud.BinaryAu" + + "thorization.V1Beta1\312\002(Google\\Cloud\\Binar" + + "yAuthorization\\V1beta1\352\002+Google::Cloud::" + + "BinaryAuthorization::V1beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -115,7 +115,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor, new java.lang.String[] { - "Pod", "DeployTime", "EndTime", "Verdict", "Images", + "PodNamespace", "Pod", "DeployTime", "EndTime", "Verdict", "Images", }); internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor = internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto index 4f7bfdd8..1666b518 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2022 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -31,6 +31,15 @@ option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; message ContinuousValidationEvent { // An auditing event for one Pod. message ContinuousValidationPodEvent { + // Audit time policy conformance verdict. + enum PolicyConformanceVerdict { + // We should always have a verdict. This is an error. + POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0; + + // The pod violates the policy. + VIOLATES_POLICY = 1; + } + // Container image with auditing details. message ImageDetails { // Result of the audit. @@ -55,14 +64,8 @@ message ContinuousValidationEvent { string description = 3; } - // Audit time policy conformance verdict. - enum PolicyConformanceVerdict { - // We should always have a verdict. This is an error. - POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0; - - // The pod violates the policy. - VIOLATES_POLICY = 1; - } + // The k8s namespace of the Pod. + string pod_namespace = 7; // The name of the Pod. string pod = 1; diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..c133323f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; +import com.google.cloud.binaryauthorization.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = + BinauthzManagementServiceV1Beta1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..6148caad --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setendpoint_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; +import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = + BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build(); + BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java new file mode 100644 index 00000000..fe2c587f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class AsyncCreateAttestor { + + public static void main(String[] args) throws Exception { + asyncCreateAttestor(); + } + + public static void asyncCreateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + CreateAttestorRequest request = + CreateAttestorRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setAttestorId("attestorId2055733027") + .setAttestor(Attestor.newBuilder().build()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.createAttestorCallable().futureCall(request); + // Do something. + Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java new file mode 100644 index 00000000..02c3d407 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncCreateAttestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestor(); + } + + public static void syncCreateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + CreateAttestorRequest request = + CreateAttestorRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setAttestorId("attestorId2055733027") + .setAttestor(Attestor.newBuilder().build()) + .build(); + Attestor response = binauthzManagementServiceV1Beta1Client.createAttestor(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java new file mode 100644 index 00000000..e912579e --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_projectnamestringattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncCreateAttestorProjectnameStringAttestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestorProjectnameStringAttestor(); + } + + public static void syncCreateAttestorProjectnameStringAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + Attestor response = + binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_projectnamestringattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java new file mode 100644 index 00000000..7bb91110 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_stringstringattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncCreateAttestorStringStringAttestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestorStringStringAttestor(); + } + + public static void syncCreateAttestorStringStringAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + Attestor response = + binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_stringstringattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java new file mode 100644 index 00000000..57e6a728 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; +import com.google.protobuf.Empty; + +public class AsyncDeleteAttestor { + + public static void main(String[] args) throws Exception { + asyncDeleteAttestor(); + } + + public static void asyncDeleteAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + DeleteAttestorRequest request = + DeleteAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.deleteAttestorCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java new file mode 100644 index 00000000..e98a4da2 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; +import com.google.protobuf.Empty; + +public class SyncDeleteAttestor { + + public static void main(String[] args) throws Exception { + syncDeleteAttestor(); + } + + public static void syncDeleteAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + DeleteAttestorRequest request = + DeleteAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + binauthzManagementServiceV1Beta1Client.deleteAttestor(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java new file mode 100644 index 00000000..8797a77d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_attestorname_sync] +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.protobuf.Empty; + +public class SyncDeleteAttestorAttestorname { + + public static void main(String[] args) throws Exception { + syncDeleteAttestorAttestorname(); + } + + public static void syncDeleteAttestorAttestorname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + binauthzManagementServiceV1Beta1Client.deleteAttestor(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java new file mode 100644 index 00000000..e5cee1e2 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_string_sync] +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.protobuf.Empty; + +public class SyncDeleteAttestorString { + + public static void main(String[] args) throws Exception { + syncDeleteAttestorString(); + } + + public static void syncDeleteAttestorString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); + binauthzManagementServiceV1Beta1Client.deleteAttestor(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java new file mode 100644 index 00000000..709b38ca --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; + +public class AsyncGetAttestor { + + public static void main(String[] args) throws Exception { + asyncGetAttestor(); + } + + public static void asyncGetAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + GetAttestorRequest request = + GetAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.getAttestorCallable().futureCall(request); + // Do something. + Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java new file mode 100644 index 00000000..55a763a7 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; + +public class SyncGetAttestor { + + public static void main(String[] args) throws Exception { + syncGetAttestor(); + } + + public static void syncGetAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + GetAttestorRequest request = + GetAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java new file mode 100644 index 00000000..c120c374 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_attestorname_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; + +public class SyncGetAttestorAttestorname { + + public static void main(String[] args) throws Exception { + syncGetAttestorAttestorname(); + } + + public static void syncGetAttestorAttestorname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java new file mode 100644 index 00000000..b0a4417a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_string_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.AttestorName; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; + +public class SyncGetAttestorString { + + public static void main(String[] args) throws Exception { + syncGetAttestorString(); + } + + public static void syncGetAttestorString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); + Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java new file mode 100644 index 00000000..bccfea74 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; + +public class AsyncGetPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPolicy(); + } + + public static void asyncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + GetPolicyRequest request = + GetPolicyRequest.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.getPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..8aad9831 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + GetPolicyRequest request = + GetPolicyRequest.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .build(); + Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java new file mode 100644 index 00000000..57c31c38 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_policyname_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; + +public class SyncGetPolicyPolicyname { + + public static void main(String[] args) throws Exception { + syncGetPolicyPolicyname(); + } + + public static void syncGetPolicyPolicyname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java new file mode 100644 index 00000000..9485d66d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_string_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; + +public class SyncGetPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPolicyString(); + } + + public static void syncGetPolicyString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + String name = PolicyName.ofProjectName("[PROJECT]").toString(); + Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java new file mode 100644 index 00000000..84f78f98 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class AsyncListAttestors { + + public static void main(String[] args) throws Exception { + asyncListAttestors(); + } + + public static void asyncListAttestors() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + ListAttestorsRequest request = + ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.listAttestorsPagedCallable().futureCall(request); + // Do something. + for (Attestor element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java new file mode 100644 index 00000000..3539418f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java @@ -0,0 +1,60 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_paged_async] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; +import com.google.common.base.Strings; + +public class AsyncListAttestorsPaged { + + public static void main(String[] args) throws Exception { + asyncListAttestorsPaged(); + } + + public static void asyncListAttestorsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + ListAttestorsRequest request = + ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + ListAttestorsResponse response = + binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request); + for (Attestor element : response.getAttestorsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_paged_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java new file mode 100644 index 00000000..c3d0466d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncListAttestors { + + public static void main(String[] args) throws Exception { + syncListAttestors(); + } + + public static void syncListAttestors() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + ListAttestorsRequest request = + ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Attestor element : + binauthzManagementServiceV1Beta1Client.listAttestors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java new file mode 100644 index 00000000..4cce9cc4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_projectname_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncListAttestorsProjectname { + + public static void main(String[] args) throws Exception { + syncListAttestorsProjectname(); + } + + public static void syncListAttestorsProjectname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + for (Attestor element : + binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_projectname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java new file mode 100644 index 00000000..843f2e63 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_string_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.ProjectName; + +public class SyncListAttestorsString { + + public static void main(String[] args) throws Exception { + syncListAttestorsString(); + } + + public static void syncListAttestorsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + for (Attestor element : + binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java new file mode 100644 index 00000000..4386ed51 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; + +public class AsyncUpdateAttestor { + + public static void main(String[] args) throws Exception { + asyncUpdateAttestor(); + } + + public static void asyncUpdateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + UpdateAttestorRequest request = + UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.updateAttestorCallable().futureCall(request); + // Do something. + Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java new file mode 100644 index 00000000..7e98ef5d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; + +public class SyncUpdateAttestor { + + public static void main(String[] args) throws Exception { + syncUpdateAttestor(); + } + + public static void syncUpdateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + UpdateAttestorRequest request = + UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build(); + Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java new file mode 100644 index 00000000..ab2c58f3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_attestor_sync] +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; + +public class SyncUpdateAttestorAttestor { + + public static void main(String[] args) throws Exception { + syncUpdateAttestorAttestor(); + } + + public static void syncUpdateAttestorAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + Attestor attestor = Attestor.newBuilder().build(); + Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(attestor); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_attestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java new file mode 100644 index 00000000..4a95a964 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java @@ -0,0 +1,45 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; + +public class AsyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicy(); + } + + public static void asyncUpdatePolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + ApiFuture future = + binauthzManagementServiceV1Beta1Client.updatePolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java new file mode 100644 index 00000000..36447e06 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; + +public class SyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicy(); + } + + public static void syncUpdatePolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + UpdatePolicyRequest request = + UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); + Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java new file mode 100644 index 00000000..6afce8dc --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_policy_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.Policy; + +public class SyncUpdatePolicyPolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyPolicy(); + } + + public static void syncUpdatePolicyPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create()) { + Policy policy = Policy.newBuilder().build(); + Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(policy); + } + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_policy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..5a0305e6 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1settings_getpolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Beta1Settings.Builder + binauthzManagementServiceV1Beta1SettingsBuilder = + BinauthzManagementServiceV1Beta1Settings.newBuilder(); + binauthzManagementServiceV1Beta1SettingsBuilder + .getPolicySettings() + .setRetrySettings( + binauthzManagementServiceV1Beta1SettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = + binauthzManagementServiceV1Beta1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1settings_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..1d32c2b4 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1stubsettings_getpolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1StubSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Beta1StubSettings.Builder + binauthzManagementServiceV1Beta1SettingsBuilder = + BinauthzManagementServiceV1Beta1StubSettings.newBuilder(); + binauthzManagementServiceV1Beta1SettingsBuilder + .getPolicySettings() + .setRetrySettings( + binauthzManagementServiceV1Beta1SettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BinauthzManagementServiceV1Beta1StubSettings binauthzManagementServiceV1Beta1Settings = + binauthzManagementServiceV1Beta1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1stubsettings_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..2135225b --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1stubsettings_getsystempolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; +import java.time.Duration; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder = + SystemPolicyV1Beta1StubSettings.newBuilder(); + systemPolicyV1Beta1SettingsBuilder + .getSystemPolicySettings() + .setRetrySettings( + systemPolicyV1Beta1SettingsBuilder + .getSystemPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SystemPolicyV1Beta1StubSettings systemPolicyV1Beta1Settings = + systemPolicyV1Beta1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1stubsettings_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..dda6b1b3 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; +import com.google.cloud.binaryauthorization.v1beta1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = + SystemPolicyV1Beta1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = + SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..e4061a8d --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setendpoint_sync] +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; +import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = + SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build(); + SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = + SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java new file mode 100644 index 00000000..6a38cc92 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_async] +import com.google.api.core.ApiFuture; +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; + +public class AsyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + asyncGetSystemPolicy(); + } + + public static void asyncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { + GetSystemPolicyRequest request = + GetSystemPolicyRequest.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .build(); + ApiFuture future = + systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request); + // Do something. + Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..738cb1d2 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { + GetSystemPolicyRequest request = + GetSystemPolicyRequest.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .build(); + Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request); + } + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java new file mode 100644 index 00000000..d9f74fd5 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_policyname_sync] +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; + +public class SyncGetSystemPolicyPolicyname { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicyPolicyname(); + } + + public static void syncGetSystemPolicyPolicyname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java new file mode 100644 index 00000000..8732b004 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_string_sync] +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.PolicyName; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; + +public class SyncGetSystemPolicyString { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicyString(); + } + + public static void syncGetSystemPolicyString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { + String name = PolicyName.ofProjectName("[PROJECT]").toString(); + Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); + } + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_string_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..b906e114 --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1settings_getsystempolicy_sync] +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; +import java.time.Duration; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder = + SystemPolicyV1Beta1Settings.newBuilder(); + systemPolicyV1Beta1SettingsBuilder + .getSystemPolicySettings() + .setRetrySettings( + systemPolicyV1Beta1SettingsBuilder + .getSystemPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = + systemPolicyV1Beta1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1settings_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..1765407d --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = + BinauthzManagementServiceV1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..e2b5d11f --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setendpoint_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = + BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build(); + BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java new file mode 100644 index 00000000..5029b0d7 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java @@ -0,0 +1,50 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncCreateAttestor { + + public static void main(String[] args) throws Exception { + asyncCreateAttestor(); + } + + public static void asyncCreateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.CreateAttestorRequest request = + Service.CreateAttestorRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setAttestorId("attestorId2055733027") + .setAttestor(Resources.Attestor.newBuilder().build()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.createAttestorCallable().futureCall(request); + // Do something. + Resources.Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java new file mode 100644 index 00000000..efbc973b --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncCreateAttestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestor(); + } + + public static void syncCreateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.CreateAttestorRequest request = + Service.CreateAttestorRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setAttestorId("attestorId2055733027") + .setAttestor(Resources.Attestor.newBuilder().build()) + .build(); + Resources.Attestor response = binauthzManagementServiceV1Client.createAttestor(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java new file mode 100644 index 00000000..6715ecc8 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_projectnamestringresourcesattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncCreateAttestorProjectnameStringResourcesattestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestorProjectnameStringResourcesattestor(); + } + + public static void syncCreateAttestorProjectnameStringResourcesattestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + Resources.Attestor response = + binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_projectnamestringresourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java new file mode 100644 index 00000000..8b4ce8e0 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_stringstringresourcesattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncCreateAttestorStringStringResourcesattestor { + + public static void main(String[] args) throws Exception { + syncCreateAttestorStringStringResourcesattestor(); + } + + public static void syncCreateAttestorStringStringResourcesattestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + Resources.Attestor response = + binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_stringstringresourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java new file mode 100644 index 00000000..e5e63a9b --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_async] +import com.google.api.core.ApiFuture; +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncDeleteAttestor { + + public static void main(String[] args) throws Exception { + asyncDeleteAttestor(); + } + + public static void asyncDeleteAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.DeleteAttestorRequest request = + Service.DeleteAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.deleteAttestorCallable().futureCall(request); + // Do something. + future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java new file mode 100644 index 00000000..2d3578b9 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_sync] +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncDeleteAttestor { + + public static void main(String[] args) throws Exception { + syncDeleteAttestor(); + } + + public static void syncDeleteAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.DeleteAttestorRequest request = + Service.DeleteAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + binauthzManagementServiceV1Client.deleteAttestor(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java new file mode 100644 index 00000000..b93043cc --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_attestorname_sync] +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; + +public class SyncDeleteAttestorAttestorname { + + public static void main(String[] args) throws Exception { + syncDeleteAttestorAttestorname(); + } + + public static void syncDeleteAttestorAttestorname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + binauthzManagementServiceV1Client.deleteAttestor(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java new file mode 100644 index 00000000..ce17ef3f --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_string_sync] +import com.google.protobuf.Empty; +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; + +public class SyncDeleteAttestorString { + + public static void main(String[] args) throws Exception { + syncDeleteAttestorString(); + } + + public static void syncDeleteAttestorString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); + binauthzManagementServiceV1Client.deleteAttestor(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_string_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java new file mode 100644 index 00000000..cdf2a792 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncGetAttestor { + + public static void main(String[] args) throws Exception { + asyncGetAttestor(); + } + + public static void asyncGetAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.GetAttestorRequest request = + Service.GetAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.getAttestorCallable().futureCall(request); + // Do something. + Resources.Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java new file mode 100644 index 00000000..f3f8d332 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncGetAttestor { + + public static void main(String[] args) throws Exception { + syncGetAttestor(); + } + + public static void syncGetAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.GetAttestorRequest request = + Service.GetAttestorRequest.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .build(); + Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java new file mode 100644 index 00000000..b27bef94 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_attestorname_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncGetAttestorAttestorname { + + public static void main(String[] args) throws Exception { + syncGetAttestorAttestorname(); + } + + public static void syncGetAttestorAttestorname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java new file mode 100644 index 00000000..35d8b2c4 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_string_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncGetAttestorString { + + public static void main(String[] args) throws Exception { + syncGetAttestorString(); + } + + public static void syncGetAttestorString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); + Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_string_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java new file mode 100644 index 00000000..6859b9c4 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncGetPolicy { + + public static void main(String[] args) throws Exception { + asyncGetPolicy(); + } + + public static void asyncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.GetPolicyRequest request = + Service.GetPolicyRequest.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.getPolicyCallable().futureCall(request); + // Do something. + Resources.Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..ed902a51 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java @@ -0,0 +1,44 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.GetPolicyRequest request = + Service.GetPolicyRequest.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .build(); + Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java new file mode 100644 index 00000000..09157171 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_policyname_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncGetPolicyPolicyname { + + public static void main(String[] args) throws Exception { + syncGetPolicyPolicyname(); + } + + public static void syncGetPolicyPolicyname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java new file mode 100644 index 00000000..f4e2634e --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_string_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncGetPolicyString { + + public static void main(String[] args) throws Exception { + syncGetPolicyString(); + } + + public static void syncGetPolicyString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + String name = PolicyName.ofProjectName("[PROJECT]").toString(); + Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_string_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java new file mode 100644 index 00000000..63686ef4 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java @@ -0,0 +1,52 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncListAttestors { + + public static void main(String[] args) throws Exception { + asyncListAttestors(); + } + + public static void asyncListAttestors() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.ListAttestorsRequest request = + Service.ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.listAttestorsPagedCallable().futureCall(request); + // Do something. + for (Resources.Attestor element : future.get().iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java new file mode 100644 index 00000000..c5969466 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java @@ -0,0 +1,59 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_paged_async] +import com.google.common.base.Strings; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncListAttestorsPaged { + + public static void main(String[] args) throws Exception { + asyncListAttestorsPaged(); + } + + public static void asyncListAttestorsPaged() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.ListAttestorsRequest request = + Service.ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + while (true) { + Service.ListAttestorsResponse response = + binauthzManagementServiceV1Client.listAttestorsCallable().call(request); + for (Resources.Attestor element : response.getAttestorsList()) { + // doThingsWith(element); + } + String nextPageToken = response.getNextPageToken(); + if (!Strings.isNullOrEmpty(nextPageToken)) { + request = request.toBuilder().setPageToken(nextPageToken).build(); + } else { + break; + } + } + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_paged_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java new file mode 100644 index 00000000..dd43c170 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncListAttestors { + + public static void main(String[] args) throws Exception { + syncListAttestors(); + } + + public static void syncListAttestors() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.ListAttestorsRequest request = + Service.ListAttestorsRequest.newBuilder() + .setParent(ProjectName.of("[PROJECT]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + for (Resources.Attestor element : + binauthzManagementServiceV1Client.listAttestors(request).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java new file mode 100644 index 00000000..15050638 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_projectname_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncListAttestorsProjectname { + + public static void main(String[] args) throws Exception { + syncListAttestorsProjectname(); + } + + public static void syncListAttestorsProjectname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + ProjectName parent = ProjectName.of("[PROJECT]"); + for (Resources.Attestor element : + binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_projectname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java new file mode 100644 index 00000000..808f6f71 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_string_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncListAttestorsString { + + public static void main(String[] args) throws Exception { + syncListAttestorsString(); + } + + public static void syncListAttestorsString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + String parent = ProjectName.of("[PROJECT]").toString(); + for (Resources.Attestor element : + binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) { + // doThingsWith(element); + } + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_string_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java new file mode 100644 index 00000000..3758acf9 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncUpdateAttestor { + + public static void main(String[] args) throws Exception { + asyncUpdateAttestor(); + } + + public static void asyncUpdateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.UpdateAttestorRequest request = + Service.UpdateAttestorRequest.newBuilder() + .setAttestor(Resources.Attestor.newBuilder().build()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.updateAttestorCallable().futureCall(request); + // Do something. + Resources.Attestor response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java new file mode 100644 index 00000000..6dbc7752 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncUpdateAttestor { + + public static void main(String[] args) throws Exception { + syncUpdateAttestor(); + } + + public static void syncUpdateAttestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.UpdateAttestorRequest request = + Service.UpdateAttestorRequest.newBuilder() + .setAttestor(Resources.Attestor.newBuilder().build()) + .build(); + Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java new file mode 100644 index 00000000..50a220e7 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_resourcesattestor_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncUpdateAttestorResourcesattestor { + + public static void main(String[] args) throws Exception { + syncUpdateAttestorResourcesattestor(); + } + + public static void syncUpdateAttestorResourcesattestor() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(attestor); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_resourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java new file mode 100644 index 00000000..4687b1a8 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class AsyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + asyncUpdatePolicy(); + } + + public static void asyncUpdatePolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.UpdatePolicyRequest request = + Service.UpdatePolicyRequest.newBuilder() + .setPolicy(Resources.Policy.newBuilder().build()) + .build(); + ApiFuture future = + binauthzManagementServiceV1Client.updatePolicyCallable().futureCall(request); + // Do something. + Resources.Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java new file mode 100644 index 00000000..c8d27d99 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; + +public class SyncUpdatePolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicy(); + } + + public static void syncUpdatePolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Service.UpdatePolicyRequest request = + Service.UpdatePolicyRequest.newBuilder() + .setPolicy(Resources.Policy.newBuilder().build()) + .build(); + Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(request); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java new file mode 100644 index 00000000..9c3e1249 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_resourcespolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; + +public class SyncUpdatePolicyResourcespolicy { + + public static void main(String[] args) throws Exception { + syncUpdatePolicyResourcespolicy(); + } + + public static void syncUpdatePolicyResourcespolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create()) { + Resources.Policy policy = Resources.Policy.newBuilder().build(); + Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(policy); + } + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_resourcespolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..2a67ee6d --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1settings_getpolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder = + BinauthzManagementServiceV1Settings.newBuilder(); + binauthzManagementServiceV1SettingsBuilder + .getPolicySettings() + .setRetrySettings( + binauthzManagementServiceV1SettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = + binauthzManagementServiceV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1settings_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java new file mode 100644 index 00000000..5bce85cb --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1stubsettings_getpolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; +import java.time.Duration; + +public class SyncGetPolicy { + + public static void main(String[] args) throws Exception { + syncGetPolicy(); + } + + public static void syncGetPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder = + BinauthzManagementServiceV1StubSettings.newBuilder(); + binauthzManagementServiceV1SettingsBuilder + .getPolicySettings() + .setRetrySettings( + binauthzManagementServiceV1SettingsBuilder + .getPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + BinauthzManagementServiceV1StubSettings binauthzManagementServiceV1Settings = + binauthzManagementServiceV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1stubsettings_getpolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..9145bf24 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1stubsettings_getsystempolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; +import java.time.Duration; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder = + SystemPolicyV1StubSettings.newBuilder(); + systemPolicyV1SettingsBuilder + .getSystemPolicySettings() + .setRetrySettings( + systemPolicyV1SettingsBuilder + .getSystemPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_systempolicyv1stubsettings_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java new file mode 100644 index 00000000..39ade354 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1stubsettings_validateattestationoccurrence_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; +import java.time.Duration; + +public class SyncValidateAttestationOccurrence { + + public static void main(String[] args) throws Exception { + syncValidateAttestationOccurrence(); + } + + public static void syncValidateAttestationOccurrence() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder = + ValidationHelperV1StubSettings.newBuilder(); + validationHelperV1SettingsBuilder + .validateAttestationOccurrenceSettings() + .setRetrySettings( + validationHelperV1SettingsBuilder + .validateAttestationOccurrenceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ValidationHelperV1StubSettings validationHelperV1Settings = + validationHelperV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_validationhelperv1stubsettings_validateattestationoccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..7421d9e1 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Settings systemPolicyV1Settings = + SystemPolicyV1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..e27dedbb --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,38 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_create_setendpoint_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Settings systemPolicyV1Settings = + SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build(); + SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java new file mode 100644 index 00000000..a8fa3b9a --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; + +public class AsyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + asyncGetSystemPolicy(); + } + + public static void asyncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { + Service.GetSystemPolicyRequest request = + Service.GetSystemPolicyRequest.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .build(); + ApiFuture future = + systemPolicyV1Client.getSystemPolicyCallable().futureCall(request); + // Do something. + Resources.Policy response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..e6c64fc5 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,43 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { + Service.GetSystemPolicyRequest request = + Service.GetSystemPolicyRequest.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .build(); + Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request); + } + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java new file mode 100644 index 00000000..9332dafb --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_policyname_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; + +public class SyncGetSystemPolicyPolicyname { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicyPolicyname(); + } + + public static void syncGetSystemPolicyPolicyname() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); + } + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java new file mode 100644 index 00000000..1f2ccc34 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_string_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; + +public class SyncGetSystemPolicyString { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicyString(); + } + + public static void syncGetSystemPolicyString() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { + String name = PolicyName.ofProjectName("[PROJECT]").toString(); + Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); + } + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_string_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java new file mode 100644 index 00000000..dcbb731c --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1settings_getsystempolicy_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; +import java.time.Duration; + +public class SyncGetSystemPolicy { + + public static void main(String[] args) throws Exception { + syncGetSystemPolicy(); + } + + public static void syncGetSystemPolicy() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder = + SystemPolicyV1Settings.newBuilder(); + systemPolicyV1SettingsBuilder + .getSystemPolicySettings() + .setRetrySettings( + systemPolicyV1SettingsBuilder + .getSystemPolicySettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_systempolicyv1settings_getsystempolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java new file mode 100644 index 00000000..472d96cb --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider_sync] +import com.google.api.gax.core.FixedCredentialsProvider; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; + +public class SyncCreateSetCredentialsProvider { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider(); + } + + public static void syncCreateSetCredentialsProvider() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ValidationHelperV1Settings validationHelperV1Settings = + ValidationHelperV1Settings.newBuilder() + .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + .build(); + ValidationHelperV1Client validationHelperV1Client = + ValidationHelperV1Client.create(validationHelperV1Settings); + } +} +// [END binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java new file mode 100644 index 00000000..cb4e8914 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java @@ -0,0 +1,39 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1client_create_setendpoint_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; +import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; + +public class SyncCreateSetEndpoint { + + public static void main(String[] args) throws Exception { + syncCreateSetEndpoint(); + } + + public static void syncCreateSetEndpoint() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ValidationHelperV1Settings validationHelperV1Settings = + ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build(); + ValidationHelperV1Client validationHelperV1Client = + ValidationHelperV1Client.create(validationHelperV1Settings); + } +} +// [END binaryauthorization_v1_generated_validationhelperv1client_create_setendpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java new file mode 100644 index 00000000..fd89b8ff --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java @@ -0,0 +1,49 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_async] +import com.google.api.core.ApiFuture; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; +import io.grafeas.v1.AttestationOccurrence; + +public class AsyncValidateAttestationOccurrence { + + public static void main(String[] args) throws Exception { + asyncValidateAttestationOccurrence(); + } + + public static void asyncValidateAttestationOccurrence() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) { + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("attestor542920680") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + ApiFuture future = + validationHelperV1Client.validateAttestationOccurrenceCallable().futureCall(request); + // Do something. + Service.ValidateAttestationOccurrenceResponse response = future.get(); + } + } +} +// [END binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java new file mode 100644 index 00000000..f2c84458 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -0,0 +1,46 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; +import io.grafeas.v1.AttestationOccurrence; + +public class SyncValidateAttestationOccurrence { + + public static void main(String[] args) throws Exception { + syncValidateAttestationOccurrence(); + } + + public static void syncValidateAttestationOccurrence() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) { + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("attestor542920680") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + Service.ValidateAttestationOccurrenceResponse response = + validationHelperV1Client.validateAttestationOccurrence(request); + } + } +} +// [END binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java new file mode 100644 index 00000000..da529e3d --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -0,0 +1,47 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1settings_validateattestationoccurrence_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; +import java.time.Duration; + +public class SyncValidateAttestationOccurrence { + + public static void main(String[] args) throws Exception { + syncValidateAttestationOccurrence(); + } + + public static void syncValidateAttestationOccurrence() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder = + ValidationHelperV1Settings.newBuilder(); + validationHelperV1SettingsBuilder + .validateAttestationOccurrenceSettings() + .setRetrySettings( + validationHelperV1SettingsBuilder + .validateAttestationOccurrenceSettings() + .getRetrySettings() + .toBuilder() + .setTotalTimeout(Duration.ofSeconds(30)) + .build()); + ValidationHelperV1Settings validationHelperV1Settings = + validationHelperV1SettingsBuilder.build(); + } +} +// [END binaryauthorization_v1_generated_validationhelperv1settings_validateattestationoccurrence_sync] From c5d1f103196a5d538e115d48f3873901fa0a065a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 23 Jun 2022 17:28:22 +0200 Subject: [PATCH 123/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 (#229) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.12.0` -> `2.13.0` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/compatibility-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/2.13.0/confidence-slim/2.12.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v2.13.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​2130-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2120v2130-2022-06-22) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.12.0...v2.13.0) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.0 ([#​709](https://togithub.com/googleapis/java-shared-dependencies/issues/709)) ([239f8c3](https://togithub.com/googleapis/java-shared-dependencies/commit/239f8c33a11e233e6af79aee8c7e68cd156a0554)) - update dependency com.google.api-client:google-api-client-bom to v1.35.1 ([#​713](https://togithub.com/googleapis/java-shared-dependencies/issues/713)) ([6559b45](https://togithub.com/googleapis/java-shared-dependencies/commit/6559b45b027dba783a9525d35e32183d78773cbe)) - update dependency com.google.api:api-common to v2.2.1 ([#​710](https://togithub.com/googleapis/java-shared-dependencies/issues/710)) ([650d4c5](https://togithub.com/googleapis/java-shared-dependencies/commit/650d4c5f8c3cfce711257d47280ad773cd2e2414)) - update dependency com.google.errorprone:error_prone_annotations to v2.14.0 ([#​701](https://togithub.com/googleapis/java-shared-dependencies/issues/701)) ([d24730f](https://togithub.com/googleapis/java-shared-dependencies/commit/d24730f78669f80b109e590b903446e5552e3e36)) - update dependency com.google.http-client:google-http-client-bom to v1.42.0 ([#​711](https://togithub.com/googleapis/java-shared-dependencies/issues/711)) ([5168a18](https://togithub.com/googleapis/java-shared-dependencies/commit/5168a181722128d434a0d0d2ab5cc485686bbc78)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.0 ([#​708](https://togithub.com/googleapis/java-shared-dependencies/issues/708)) ([620336e](https://togithub.com/googleapis/java-shared-dependencies/commit/620336e6733e2017116e5e8a7b403b183a728bc1)) - update dependency com.google.oauth-client:google-oauth-client-bom to v1.34.1 ([#​712](https://togithub.com/googleapis/java-shared-dependencies/issues/712)) ([a2c18a5](https://togithub.com/googleapis/java-shared-dependencies/commit/a2c18a5bc4152cc9034cec691a29f54a35c38a51)) - update dependency com.google.protobuf:protobuf-bom to v3.21.0 ([#​703](https://togithub.com/googleapis/java-shared-dependencies/issues/703)) ([5f9fe12](https://togithub.com/googleapis/java-shared-dependencies/commit/5f9fe1200b4bdf4c54bf947c21bd3ed02f26f990)) - update dependency com.google.protobuf:protobuf-bom to v3.21.1 ([#​705](https://togithub.com/googleapis/java-shared-dependencies/issues/705)) ([c68edfb](https://togithub.com/googleapis/java-shared-dependencies/commit/c68edfbe7e1993e1112640b867b29aa2fbcf7579)) - update dependency io.grpc:grpc-bom to v1.47.0 ([#​707](https://togithub.com/googleapis/java-shared-dependencies/issues/707)) ([d02918a](https://togithub.com/googleapis/java-shared-dependencies/commit/d02918a0418cd65d1d247f27afb0637f1f8f5666)) - update dependency org.checkerframework:checker-qual to v3.22.1 ([#​706](https://togithub.com/googleapis/java-shared-dependencies/issues/706)) ([545843b](https://togithub.com/googleapis/java-shared-dependencies/commit/545843b492cead230b8cc72a1dae7d4922f33b39)) - update dependency org.checkerframework:checker-qual to v3.22.2 ([#​717](https://togithub.com/googleapis/java-shared-dependencies/issues/717)) ([142852a](https://togithub.com/googleapis/java-shared-dependencies/commit/142852a37140f221197f5c71aed451def353b1e0)) - update gax.version to v2.18.2 ([#​718](https://togithub.com/googleapis/java-shared-dependencies/issues/718)) ([5f8156e](https://togithub.com/googleapis/java-shared-dependencies/commit/5f8156e55c6a07b018a8c5efafa68be781b4288b)) - update google.common-protos.version to v2.9.0 ([#​714](https://togithub.com/googleapis/java-shared-dependencies/issues/714)) ([9e5591e](https://togithub.com/googleapis/java-shared-dependencies/commit/9e5591ec3035350450ecbfebd00e08216433b06c)) - update google.core.version to v2.8.0 ([#​719](https://togithub.com/googleapis/java-shared-dependencies/issues/719)) ([4023c60](https://togithub.com/googleapis/java-shared-dependencies/commit/4023c6063a2c5b5308da531df1a08c90c491965d)) - update iam.version to v1.4.0 ([#​700](https://togithub.com/googleapis/java-shared-dependencies/issues/700)) ([c1097a4](https://togithub.com/googleapis/java-shared-dependencies/commit/c1097a46ab0739b0b7234bc510e4c3d9ce2c2861)) - update iam.version to v1.4.1 ([#​716](https://togithub.com/googleapis/java-shared-dependencies/issues/716)) ([e2dc7c2](https://togithub.com/googleapis/java-shared-dependencies/commit/e2dc7c21c39e007878841e2664d548ec44a72d54))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 399a6e49..171674f3 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.12.0 + 2.13.0 pom import From 73745540d6187af67f8fdd1029485a860c45d7a7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 24 Jun 2022 16:58:11 +0200 Subject: [PATCH 124/203] deps: update dependency io.grafeas:grafeas to v2.3.1 (#231) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/java-grafeas) | `2.3.0` -> `2.3.1` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.1/compatibility-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.3.1/confidence-slim/2.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-grafeas ### [`v2.3.1`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​231-httpsgithubcomgoogleapisjava-grafeascomparev230v231-2022-06-23) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.3.0...v2.3.1) ##### Dependencies - update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#​500](https://togithub.com/googleapis/java-grafeas/issues/500)) ([70c75bb](https://togithub.com/googleapis/java-grafeas/commit/70c75bbdb77e04d4c80ce057bb9382df117e6321))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 171674f3..341a0850 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.3.0 + 2.3.1 io.perfmark From 34534bcb01672284875546a0b7310d18412acc5f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 27 Jun 2022 19:26:37 +0000 Subject: [PATCH 125/203] chore: update dependencies for regapic (#1467) (#232) * chore: update dependencies for regapic * add more dependencies and trigger comment * update goldens * fix indentation * remove duplicate gax-httpjson dependency * remove duplicated dependencies Source-Link: https://github.com/googleapis/synthtool/commit/fa54eb2a78c6ee48613fd33152e2130e949dcbd9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/common.sh | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 68f2b159..f0625e4d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:58ccd4737212f64a7dd4b3063d447447acf71a2b9d409eab19fc7a00b18eadc0 -# created: 2022-06-10T19:20:11.004014696Z + digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 +# created: 2022-06-27T15:01:06.405564326Z diff --git a/.kokoro/common.sh b/.kokoro/common.sh index ace89f45..f8f957af 100644 --- a/.kokoro/common.sh +++ b/.kokoro/common.sh @@ -55,4 +55,6 @@ function retry_with_backoff { ## Helper functionss function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file +function println() { printf '%s\n' "$(now) $*"; } + +## Helper comment to trigger updated repo dependency release \ No newline at end of file From f7d69d93dffba1599c8979ba5dd308c20b54abe1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 02:18:24 +0000 Subject: [PATCH 126/203] chore: Disable CLIRR checks on releas (#1474) (#235) Source-Link: https://github.com/googleapis/synthtool/commit/7a220e27993a25ab3cda26510d5619d97b6952a9 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 --- .github/.OwlBot.lock.yaml | 4 ++-- .kokoro/release/stage.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index f0625e4d..a454a61e 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:1ec28a46062b19135b11178ceee60231e5f5a92dab454e23ae0aab72cd875906 -# created: 2022-06-27T15:01:06.405564326Z + digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 +# created: 2022-06-29T23:17:33.110417661Z diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 77dc4e8f..1dba8de1 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -32,6 +32,7 @@ retry_with_backoff 3 10 \ mvn clean deploy -B \ --settings ${MAVEN_SETTINGS_FILE} \ -DskipTests=true \ + -Dclirr.skip=true \ -DperformRelease=true \ -Dgpg.executable=gpg \ -Dgpg.passphrase=${GPG_PASSPHRASE} \ @@ -42,4 +43,4 @@ then mvn nexus-staging:release -B \ -DperformRelease=true \ --settings=settings.xml -fi \ No newline at end of file +fi From ca507e6aca8a35467d95038d7554c0c5f357315a Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Jun 2022 18:56:18 +0000 Subject: [PATCH 127/203] feat: Enable REST transport for most of Java and Go clients (#230) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 456641589 Source-Link: https://github.com/googleapis/googleapis/commit/8a251f5225b789b2383207ffd978f6aa3d77fcf7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4ca52a529cf01308d9714950edffbea3560cfbdb Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGNhNTJhNTI5Y2YwMTMwOGQ5NzE0OTUwZWRmZmJlYTM1NjBjZmJkYiJ9 --- .kokoro/dependencies.sh | 4 +- google-cloud-binary-authorization/pom.xml | 16 + ...inauthzManagementServiceV1Beta1Client.java | 16 + ...authzManagementServiceV1Beta1Settings.java | 23 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 15 + .../v1beta1/SystemPolicyV1Beta1Settings.java | 23 +- ...zManagementServiceV1Beta1StubSettings.java | 54 +- ...nagementServiceV1Beta1CallableFactory.java | 105 +++ ...nBinauthzManagementServiceV1Beta1Stub.java | 526 +++++++++++++ ...sonSystemPolicyV1Beta1CallableFactory.java | 105 +++ .../stub/HttpJsonSystemPolicyV1Beta1Stub.java | 194 +++++ .../stub/SystemPolicyV1Beta1StubSettings.java | 53 +- .../v1/BinauthzManagementServiceV1Client.java | 16 + .../BinauthzManagementServiceV1Settings.java | 23 +- .../v1/SystemPolicyV1Client.java | 14 + .../v1/SystemPolicyV1Settings.java | 23 +- .../v1/ValidationHelperV1Client.java | 15 + .../v1/ValidationHelperV1Settings.java | 23 +- ...nauthzManagementServiceV1StubSettings.java | 53 +- ...thzManagementServiceV1CallableFactory.java | 105 +++ ...tpJsonBinauthzManagementServiceV1Stub.java | 528 +++++++++++++ ...HttpJsonSystemPolicyV1CallableFactory.java | 105 +++ .../v1/stub/HttpJsonSystemPolicyV1Stub.java | 194 +++++ ...JsonValidationHelperV1CallableFactory.java | 105 +++ .../stub/HttpJsonValidationHelperV1Stub.java | 218 ++++++ .../v1/stub/SystemPolicyV1StubSettings.java | 53 +- .../stub/ValidationHelperV1StubSettings.java | 53 +- ...ementServiceV1Beta1ClientHttpJsonTest.java | 687 +++++++++++++++++ ...SystemPolicyV1Beta1ClientHttpJsonTest.java | 180 +++++ ...ManagementServiceV1ClientHttpJsonTest.java | 699 ++++++++++++++++++ .../v1/SystemPolicyV1ClientHttpJsonTest.java | 184 +++++ .../ValidationHelperV1ClientHttpJsonTest.java | 131 ++++ owlbot.py | 4 +- .../SyncCreateSetCredentialsProvider1.java | 42 ++ .../SyncCreateSetCredentialsProvider1.java | 41 + .../SyncCreateSetCredentialsProvider1.java | 42 ++ .../SyncCreateSetCredentialsProvider1.java | 40 + .../SyncCreateSetCredentialsProvider1.java | 41 + 38 files changed, 4725 insertions(+), 28 deletions(-) create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java create mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java create mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java create mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index d7476cfe..1351152b 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -66,11 +66,11 @@ function completenessCheck() { # This is stripped from the output as it is not present in the flattened pom. # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt + mvn dependency:list -f pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,opencensus-api,opencensus-contrib-http-util,httpclient,httpcore -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + mvn dependency:list -f .flattened-pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,opencensus-api,opencensus-contrib-http-util,httpclient,httpcore -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt # Compare two dependency lists msg "Comparing dependency lists..." diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 7737f183..ae74ec9d 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -62,6 +62,10 @@ com.google.api gax-grpc + + com.google.api + gax-httpjson + org.threeten threetenbp @@ -91,12 +95,24 @@ test + + com.google.api + gax + testlib + test + com.google.api gax-grpc testlib test + + com.google.api + gax-httpjson + testlib + test + diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index ca587ae1..925ebfa0 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -110,6 +110,22 @@ * BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); * }
* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
+ *     BinauthzManagementServiceV1Beta1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder()
+ *                 .build())
+ *         .build();
+ * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
+ *     BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java index 1628c472..46d41dfa 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java @@ -23,6 +23,7 @@ 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.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -143,11 +144,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return BinauthzManagementServiceV1Beta1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return BinauthzManagementServiceV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BinauthzManagementServiceV1Beta1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return BinauthzManagementServiceV1Beta1StubSettings.defaultTransportChannelProvider(); } @@ -157,11 +165,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return BinauthzManagementServiceV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -200,6 +214,11 @@ private static Builder createDefault() { return new Builder(BinauthzManagementServiceV1Beta1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder()); + } + public BinauthzManagementServiceV1Beta1StubSettings.Builder getStubSettingsBuilder() { return ((BinauthzManagementServiceV1Beta1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java index 5fb4e062..a3017bbd 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -92,6 +92,21 @@ * SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); * }

* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
+ *     SystemPolicyV1Beta1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
+ *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @BetaApi diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java index b23db1b3..1508441e 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java @@ -21,6 +21,7 @@ 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.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -101,11 +102,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return SystemPolicyV1Beta1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return SystemPolicyV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return SystemPolicyV1Beta1StubSettings.defaultTransportChannelProvider(); } @@ -115,11 +123,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return SystemPolicyV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -157,6 +171,11 @@ private static Builder createDefault() { return new Builder(SystemPolicyV1Beta1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder()); + } + public SystemPolicyV1Beta1StubSettings.Builder getStubSettingsBuilder() { return ((SystemPolicyV1Beta1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java index 1e95f878..b600d3c5 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java @@ -27,6 +27,9 @@ 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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -210,6 +213,11 @@ public BinauthzManagementServiceV1Beta1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcBinauthzManagementServiceV1Beta1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBinauthzManagementServiceV1Beta1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -242,18 +250,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + 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() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", @@ -262,11 +277,31 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", + GaxProperties.getLibraryVersion(BinauthzManagementServiceV1Beta1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BinauthzManagementServiceV1Beta1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -408,6 +443,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .getPolicySettings() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java new file mode 100644 index 00000000..3fdaa60f --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BinauthzManagementServiceV1Beta1 service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBinauthzManagementServiceV1Beta1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java new file mode 100644 index 00000000..16697201 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java @@ -0,0 +1,526 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub; + +import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.binaryauthorization.v1beta1.Attestor; +import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; +import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; +import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BinauthzManagementServiceV1Beta1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonBinauthzManagementServiceV1Beta1Stub + extends BinauthzManagementServiceV1Beta1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor getPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdatePolicy") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{policy.name=projects/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policy.name", request.getPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("policy", request.getPolicy())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/CreateAttestor") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{parent=projects/*}/attestors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "attestorId", request.getAttestorId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("attestor", request.getAttestor())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetAttestor") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdateAttestor") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{attestor.name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "attestor.name", request.getAttestor().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("attestor", request.getAttestor())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listAttestorsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/ListAttestors") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{parent=projects/*}/attestors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListAttestorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/DeleteAttestor") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getPolicyCallable; + private final UnaryCallable updatePolicyCallable; + private final UnaryCallable createAttestorCallable; + private final UnaryCallable getAttestorCallable; + private final UnaryCallable updateAttestorCallable; + private final UnaryCallable listAttestorsCallable; + private final UnaryCallable + listAttestorsPagedCallable; + private final UnaryCallable deleteAttestorCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( + BinauthzManagementServiceV1Beta1StubSettings settings) throws IOException { + return new HttpJsonBinauthzManagementServiceV1Beta1Stub( + settings, ClientContext.create(settings)); + } + + public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( + ClientContext clientContext) throws IOException { + return new HttpJsonBinauthzManagementServiceV1Beta1Stub( + BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBinauthzManagementServiceV1Beta1Stub( + BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonBinauthzManagementServiceV1Beta1Stub, 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 HttpJsonBinauthzManagementServiceV1Beta1Stub( + BinauthzManagementServiceV1Beta1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonBinauthzManagementServiceV1Beta1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBinauthzManagementServiceV1Beta1Stub, 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 HttpJsonBinauthzManagementServiceV1Beta1Stub( + BinauthzManagementServiceV1Beta1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updatePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings createAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings getAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listAttestorsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listAttestorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.createAttestorCallable = + callableFactory.createUnaryCallable( + createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); + this.getAttestorCallable = + callableFactory.createUnaryCallable( + getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); + this.updateAttestorCallable = + callableFactory.createUnaryCallable( + updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); + this.listAttestorsCallable = + callableFactory.createUnaryCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.listAttestorsPagedCallable = + callableFactory.createPagedCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.deleteAttestorCallable = + callableFactory.createUnaryCallable( + deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getPolicyMethodDescriptor); + methodDescriptors.add(updatePolicyMethodDescriptor); + methodDescriptors.add(createAttestorMethodDescriptor); + methodDescriptors.add(getAttestorMethodDescriptor); + methodDescriptors.add(updateAttestorMethodDescriptor); + methodDescriptors.add(listAttestorsMethodDescriptor); + methodDescriptors.add(deleteAttestorMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public UnaryCallable createAttestorCallable() { + return createAttestorCallable; + } + + @Override + public UnaryCallable getAttestorCallable() { + return getAttestorCallable; + } + + @Override + public UnaryCallable updateAttestorCallable() { + return updateAttestorCallable; + } + + @Override + public UnaryCallable listAttestorsCallable() { + return listAttestorsCallable; + } + + @Override + public UnaryCallable + listAttestorsPagedCallable() { + return listAttestorsPagedCallable; + } + + @Override + public UnaryCallable deleteAttestorCallable() { + return deleteAttestorCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java new file mode 100644 index 00000000..8f2ee604 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SystemPolicyV1Beta1 service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSystemPolicyV1Beta1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java new file mode 100644 index 00000000..9dee319f --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java @@ -0,0 +1,194 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; +import com.google.cloud.binaryauthorization.v1beta1.Policy; +import com.google.protobuf.TypeRegistry; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SystemPolicyV1Beta1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonSystemPolicyV1Beta1Stub extends SystemPolicyV1Beta1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getSystemPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1beta1/{name=locations/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getSystemPolicyCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonSystemPolicyV1Beta1Stub create( + SystemPolicyV1Beta1StubSettings settings) throws IOException { + return new HttpJsonSystemPolicyV1Beta1Stub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSystemPolicyV1Beta1Stub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSystemPolicyV1Beta1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonSystemPolicyV1Beta1Stub, 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 HttpJsonSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonSystemPolicyV1Beta1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSystemPolicyV1Beta1Stub, 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 HttpJsonSystemPolicyV1Beta1Stub( + SystemPolicyV1Beta1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getSystemPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSystemPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.getSystemPolicyCallable = + callableFactory.createUnaryCallable( + getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getSystemPolicyMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getSystemPolicyCallable() { + return getSystemPolicyCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java index a5ba7c01..2bdfab50 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java @@ -24,6 +24,9 @@ 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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -97,6 +100,11 @@ public SystemPolicyV1Beta1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcSystemPolicyV1Beta1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSystemPolicyV1Beta1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -129,18 +137,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + 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() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1Beta1StubSettings.class)) @@ -148,11 +163,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1Beta1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SystemPolicyV1Beta1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -230,6 +264,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .getSystemPolicySettings() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java index dce518a8..cdff3097 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -109,6 +109,22 @@ * BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); * }

* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
+ *     BinauthzManagementServiceV1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder()
+ *                 .build())
+ *         .build();
+ * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
+ *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java index 563d61c5..ec910fbe 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java @@ -23,6 +23,7 @@ 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.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -139,11 +140,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return BinauthzManagementServiceV1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return BinauthzManagementServiceV1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return BinauthzManagementServiceV1StubSettings.defaultTransportChannelProvider(); } @@ -153,11 +161,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return BinauthzManagementServiceV1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -196,6 +210,11 @@ private static Builder createDefault() { return new Builder(BinauthzManagementServiceV1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder()); + } + public BinauthzManagementServiceV1StubSettings.Builder getStubSettingsBuilder() { return ((BinauthzManagementServiceV1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java index c55d857e..44852203 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -88,6 +88,20 @@ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); * }

* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * SystemPolicyV1Settings systemPolicyV1Settings =
+ *     SystemPolicyV1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java index 1010ea02..85a0e384 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java @@ -21,6 +21,7 @@ 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.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -100,11 +101,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return SystemPolicyV1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return SystemPolicyV1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return SystemPolicyV1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return SystemPolicyV1StubSettings.defaultTransportChannelProvider(); } @@ -114,11 +122,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return SystemPolicyV1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -156,6 +170,11 @@ private static Builder createDefault() { return new Builder(SystemPolicyV1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(SystemPolicyV1StubSettings.newHttpJsonBuilder()); + } + public SystemPolicyV1StubSettings.Builder getStubSettingsBuilder() { return ((SystemPolicyV1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java index 7375f421..1e86f3ea 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java @@ -98,6 +98,21 @@ * ValidationHelperV1Client.create(validationHelperV1Settings); * }

* + *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *

{@code
+ * // This snippet has been automatically generated for illustrative purposes only.
+ * // It may require modifications to work in your environment.
+ * ValidationHelperV1Settings validationHelperV1Settings =
+ *     ValidationHelperV1Settings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ValidationHelperV1Client validationHelperV1Client =
+ *     ValidationHelperV1Client.create(validationHelperV1Settings);
+ * }
+ * *

Please refer to the GitHub repository's samples for more quickstart code snippets. */ @Generated("by gapic-generator-java") diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java index d41bb953..5c02ef7c 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java @@ -21,6 +21,7 @@ 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.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; import com.google.api.gax.rpc.ClientSettings; @@ -104,11 +105,18 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde return ValidationHelperV1StubSettings.defaultCredentialsProviderBuilder(); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return ValidationHelperV1StubSettings.defaultGrpcTransportProviderBuilder(); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ValidationHelperV1StubSettings.defaultHttpJsonTransportProviderBuilder(); + } + public static TransportChannelProvider defaultTransportChannelProvider() { return ValidationHelperV1StubSettings.defaultTransportChannelProvider(); } @@ -118,11 +126,17 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil return ValidationHelperV1StubSettings.defaultApiClientHeaderProviderBuilder(); } - /** Returns a new builder for this class. */ + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -160,6 +174,11 @@ private static Builder createDefault() { return new Builder(ValidationHelperV1StubSettings.newBuilder()); } + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ValidationHelperV1StubSettings.newHttpJsonBuilder()); + } + public ValidationHelperV1StubSettings.Builder getStubSettingsBuilder() { return ((ValidationHelperV1StubSettings.Builder) getStubSettings()); } diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java index 47ddca33..acf472b8 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java @@ -27,6 +27,9 @@ 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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiCallContext; import com.google.api.gax.rpc.ApiClientHeaderProvider; @@ -218,6 +221,11 @@ public BinauthzManagementServiceV1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcBinauthzManagementServiceV1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonBinauthzManagementServiceV1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -250,18 +258,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + 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() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(BinauthzManagementServiceV1StubSettings.class)) @@ -269,11 +284,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(BinauthzManagementServiceV1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return BinauthzManagementServiceV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -420,6 +454,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .getPolicySettings() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java new file mode 100644 index 00000000..256e2744 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the BinauthzManagementServiceV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonBinauthzManagementServiceV1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java new file mode 100644 index 00000000..f94a985f --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java @@ -0,0 +1,528 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.Empty; +import com.google.protobuf.TypeRegistry; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the BinauthzManagementServiceV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonBinauthzManagementServiceV1Stub extends BinauthzManagementServiceV1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updatePolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{policy.name=projects/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "policy.name", request.getPolicy().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("policy", request.getPolicy())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + createAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*}/attestors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "attestorId", request.getAttestorId()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("attestor", request.getAttestor())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + getAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + updateAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor") + .setHttpMethod("PUT") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{attestor.name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "attestor.name", request.getAttestor().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("attestor", request.getAttestor())) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Attestor.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor< + Service.ListAttestorsRequest, Service.ListAttestorsResponse> + listAttestorsMethodDescriptor = + ApiMethodDescriptor + .newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{parent=projects/*}/attestors", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Service.ListAttestorsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + deleteAttestorMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=projects/*/attestors/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable getPolicyCallable; + private final UnaryCallable updatePolicyCallable; + private final UnaryCallable + createAttestorCallable; + private final UnaryCallable getAttestorCallable; + private final UnaryCallable + updateAttestorCallable; + private final UnaryCallable + listAttestorsCallable; + private final UnaryCallable + listAttestorsPagedCallable; + private final UnaryCallable deleteAttestorCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonBinauthzManagementServiceV1Stub create( + BinauthzManagementServiceV1StubSettings settings) throws IOException { + return new HttpJsonBinauthzManagementServiceV1Stub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonBinauthzManagementServiceV1Stub create(ClientContext clientContext) + throws IOException { + return new HttpJsonBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonBinauthzManagementServiceV1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonBinauthzManagementServiceV1Stub, 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 HttpJsonBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonBinauthzManagementServiceV1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonBinauthzManagementServiceV1Stub, 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 HttpJsonBinauthzManagementServiceV1Stub( + BinauthzManagementServiceV1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings getPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updatePolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updatePolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + createAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + getAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + updateAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings + listAttestorsTransportSettings = + HttpJsonCallSettings + .newBuilder() + .setMethodDescriptor(listAttestorsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteAttestorTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteAttestorMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.getPolicyCallable = + callableFactory.createUnaryCallable( + getPolicyTransportSettings, settings.getPolicySettings(), clientContext); + this.updatePolicyCallable = + callableFactory.createUnaryCallable( + updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); + this.createAttestorCallable = + callableFactory.createUnaryCallable( + createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); + this.getAttestorCallable = + callableFactory.createUnaryCallable( + getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); + this.updateAttestorCallable = + callableFactory.createUnaryCallable( + updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); + this.listAttestorsCallable = + callableFactory.createUnaryCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.listAttestorsPagedCallable = + callableFactory.createPagedCallable( + listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); + this.deleteAttestorCallable = + callableFactory.createUnaryCallable( + deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getPolicyMethodDescriptor); + methodDescriptors.add(updatePolicyMethodDescriptor); + methodDescriptors.add(createAttestorMethodDescriptor); + methodDescriptors.add(getAttestorMethodDescriptor); + methodDescriptors.add(updateAttestorMethodDescriptor); + methodDescriptors.add(listAttestorsMethodDescriptor); + methodDescriptors.add(deleteAttestorMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getPolicyCallable() { + return getPolicyCallable; + } + + @Override + public UnaryCallable updatePolicyCallable() { + return updatePolicyCallable; + } + + @Override + public UnaryCallable createAttestorCallable() { + return createAttestorCallable; + } + + @Override + public UnaryCallable getAttestorCallable() { + return getAttestorCallable; + } + + @Override + public UnaryCallable updateAttestorCallable() { + return updateAttestorCallable; + } + + @Override + public UnaryCallable + listAttestorsCallable() { + return listAttestorsCallable; + } + + @Override + public UnaryCallable + listAttestorsPagedCallable() { + return listAttestorsPagedCallable; + } + + @Override + public UnaryCallable deleteAttestorCallable() { + return deleteAttestorCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java new file mode 100644 index 00000000..91c421ef --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the SystemPolicyV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonSystemPolicyV1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java new file mode 100644 index 00000000..7d357f02 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java @@ -0,0 +1,194 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.TypeRegistry; +import com.google.protos.google.cloud.binaryauthorization.v1.Resources; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the SystemPolicyV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonSystemPolicyV1Stub extends SystemPolicyV1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor + getSystemPolicyMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v1/{name=locations/*/policy}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "name", request.getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Resources.Policy.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable + getSystemPolicyCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonSystemPolicyV1Stub create(SystemPolicyV1StubSettings settings) + throws IOException { + return new HttpJsonSystemPolicyV1Stub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonSystemPolicyV1Stub create(ClientContext clientContext) + throws IOException { + return new HttpJsonSystemPolicyV1Stub( + SystemPolicyV1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonSystemPolicyV1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonSystemPolicyV1Stub( + SystemPolicyV1StubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonSystemPolicyV1Stub, 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 HttpJsonSystemPolicyV1Stub( + SystemPolicyV1StubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonSystemPolicyV1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonSystemPolicyV1Stub, 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 HttpJsonSystemPolicyV1Stub( + SystemPolicyV1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings + getSystemPolicyTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(getSystemPolicyMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.getSystemPolicyCallable = + callableFactory.createUnaryCallable( + getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(getSystemPolicyMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable getSystemPolicyCallable() { + return getSystemPolicyCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java new file mode 100644 index 00000000..83c6e2e1 --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +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.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ValidationHelperV1 service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonValidationHelperV1CallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java new file mode 100644 index 00000000..4e13200b --- /dev/null +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java @@ -0,0 +1,218 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.protobuf.TypeRegistry; +import com.google.protos.google.cloud.binaryauthorization.v1.Service; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST stub implementation for the ValidationHelperV1 service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +@BetaApi +public class HttpJsonValidationHelperV1Stub extends ValidationHelperV1Stub { + private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); + + private static final ApiMethodDescriptor< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter + .newBuilder() + .setPath( + "/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + serializer.putPathParam(fields, "attestor", request.getAttestor()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer + serializer = ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearAttestor().build())) + .build()) + .setResponseParser( + ProtoMessageResponseParser + .newBuilder() + .setDefaultInstance( + Service.ValidateAttestationOccurrenceResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private final UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonValidationHelperV1Stub create(ValidationHelperV1StubSettings settings) + throws IOException { + return new HttpJsonValidationHelperV1Stub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonValidationHelperV1Stub create(ClientContext clientContext) + throws IOException { + return new HttpJsonValidationHelperV1Stub( + ValidationHelperV1StubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonValidationHelperV1Stub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonValidationHelperV1Stub( + ValidationHelperV1StubSettings.newHttpJsonBuilder().build(), + clientContext, + callableFactory); + } + + /** + * Constructs an instance of HttpJsonValidationHelperV1Stub, 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 HttpJsonValidationHelperV1Stub( + ValidationHelperV1StubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new HttpJsonValidationHelperV1CallableFactory()); + } + + /** + * Constructs an instance of HttpJsonValidationHelperV1Stub, 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 HttpJsonValidationHelperV1Stub( + ValidationHelperV1StubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + + HttpJsonCallSettings< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(validateAttestationOccurrenceMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.validateAttestationOccurrenceCallable = + callableFactory.createUnaryCallable( + validateAttestationOccurrenceTransportSettings, + settings.validateAttestationOccurrenceSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(validateAttestationOccurrenceMethodDescriptor); + return methodDescriptors; + } + + @Override + public UnaryCallable< + Service.ValidateAttestationOccurrenceRequest, + Service.ValidateAttestationOccurrenceResponse> + validateAttestationOccurrenceCallable() { + return validateAttestationOccurrenceCallable; + } + + @Override + public final void close() { + try { + backgroundResources.close(); + } catch (RuntimeException e) { + throw e; + } catch (Exception e) { + throw new IllegalStateException("Failed to close resource", e); + } + } + + @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java index 5c459673..7989f862 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java @@ -24,6 +24,9 @@ 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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -97,6 +100,11 @@ public SystemPolicyV1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcSystemPolicyV1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonSystemPolicyV1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -129,18 +137,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + 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() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1StubSettings.class)) @@ -148,11 +163,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return SystemPolicyV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -230,6 +264,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .getSystemPolicySettings() diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java index 27c3f45e..b73b6fb9 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java @@ -24,6 +24,9 @@ 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.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.ApiClientHeaderProvider; import com.google.api.gax.rpc.ClientContext; @@ -101,6 +104,11 @@ public ValidationHelperV1Stub createStub() throws IOException { .equals(GrpcTransportChannel.getGrpcTransportName())) { return GrpcValidationHelperV1Stub.create(this); } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonValidationHelperV1Stub.create(this); + } throw new UnsupportedOperationException( String.format( "Transport not supported: %s", getTransportChannelProvider().getTransportName())); @@ -133,18 +141,25 @@ public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilde .setUseJwtAccessWithScope(true); } - /** Returns a builder for the default ChannelProvider for this service. */ + /** Returns a builder for the default gRPC ChannelProvider for this service. */ public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { return InstantiatingGrpcChannelProvider.newBuilder() .setMaxInboundMessageSize(Integer.MAX_VALUE); } + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + 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() { + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { return ApiClientHeaderProvider.newBuilder() .setGeneratedLibToken( "gapic", GaxProperties.getLibraryVersion(ValidationHelperV1StubSettings.class)) @@ -152,11 +167,30 @@ public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuil GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); } - /** Returns a new builder for this class. */ + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ValidationHelperV1StubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ValidationHelperV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ public static Builder newBuilder() { return Builder.createDefault(); } + /** Returns a new REST builder for this class. */ + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + /** Returns a new builder for this class. */ public static Builder newBuilder(ClientContext clientContext) { return new Builder(clientContext); @@ -239,6 +273,19 @@ private static Builder createDefault() { return initDefaults(builder); } + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + private static Builder initDefaults(Builder builder) { builder .validateAttestationOccurrenceSettings() diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java new file mode 100644 index 00000000..baa6615d --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java @@ -0,0 +1,687 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1; + +import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.binaryauthorization.v1beta1.stub.HttpJsonBinauthzManagementServiceV1Beta1Stub; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +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 BinauthzManagementServiceV1Beta1ClientHttpJsonTest { + private static MockHttpService mockService; + private static BinauthzManagementServiceV1Beta1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBinauthzManagementServiceV1Beta1Stub.getMethodDescriptors(), + BinauthzManagementServiceV1Beta1Settings.getDefaultEndpoint()); + BinauthzManagementServiceV1Beta1Settings settings = + BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BinauthzManagementServiceV1Beta1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-415/policy"; + + Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-415/policy"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Policy policy = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + + Policy actualResponse = client.updatePolicy(policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Policy policy = + Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + client.updatePolicy(policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest() throws Exception { + Attestor expectedResponse = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + + Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest2() throws Exception { + Attestor expectedResponse = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + + Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + String attestorId = "attestorId2055733027"; + Attestor attestor = Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest() throws Exception { + Attestor expectedResponse = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest2() throws Exception { + Attestor expectedResponse = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2729/attestors/attestor-2729"; + + Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2729/attestors/attestor-2729"; + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAttestorTest() throws Exception { + Attestor expectedResponse = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Attestor attestor = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + + Attestor actualResponse = client.updateAttestor(attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Attestor attestor = + Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + client.updateAttestor(attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest() throws Exception { + Attestor responsesElement = Attestor.newBuilder().build(); + ListAttestorsResponse expectedResponse = + ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttestorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest2() throws Exception { + Attestor responsesElement = Attestor.newBuilder().build(); + ListAttestorsResponse expectedResponse = + ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttestorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + client.deleteAttestor(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2729/attestors/attestor-2729"; + + client.deleteAttestor(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2729/attestors/attestor-2729"; + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java new file mode 100644 index 00000000..fb1cb04d --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java @@ -0,0 +1,180 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.cloud.binaryauthorization.v1beta1.stub.HttpJsonSystemPolicyV1Beta1Stub; +import com.google.protobuf.Timestamp; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +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 SystemPolicyV1Beta1ClientHttpJsonTest { + private static MockHttpService mockService; + private static SystemPolicyV1Beta1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSystemPolicyV1Beta1Stub.getMethodDescriptors(), + SystemPolicyV1Beta1Settings.getDefaultEndpoint()); + SystemPolicyV1Beta1Settings settings = + SystemPolicyV1Beta1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SystemPolicyV1Beta1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getSystemPolicyTest() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + + Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSystemPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSystemPolicyTest2() throws Exception { + Policy expectedResponse = + Policy.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) + .putAllIstioServiceIdentityAdmissionRules(new HashMap()) + .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "locations/location-9731/policy"; + + Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSystemPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "locations/location-9731/policy"; + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java new file mode 100644 index 00000000..6284517d --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java @@ -0,0 +1,699 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.common.collect.Lists; +import com.google.protobuf.Empty; +import com.google.protobuf.Timestamp; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonBinauthzManagementServiceV1Stub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +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 BinauthzManagementServiceV1ClientHttpJsonTest { + private static MockHttpService mockService; + private static BinauthzManagementServiceV1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonBinauthzManagementServiceV1Stub.getMethodDescriptors(), + BinauthzManagementServiceV1Settings.getDefaultEndpoint()); + BinauthzManagementServiceV1Settings settings = + BinauthzManagementServiceV1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = BinauthzManagementServiceV1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getPolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + + Resources.Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyName name = PolicyName.ofProjectName("[PROJECT]"); + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getPolicyTest2() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-415/policy"; + + Resources.Policy actualResponse = client.getPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-415/policy"; + client.getPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updatePolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Resources.Policy policy = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + + Resources.Policy actualResponse = client.updatePolicy(policy); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updatePolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Resources.Policy policy = + Resources.Policy.newBuilder() + .setName(PolicyName.ofProjectName("[PROJECT]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns( + new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules( + new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + client.updatePolicy(policy); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + + Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createAttestorTest2() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + + Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void createAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + String attestorId = "attestorId2055733027"; + Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); + client.createAttestor(parent, attestorId, attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + Resources.Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getAttestorTest2() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2729/attestors/attestor-2729"; + + Resources.Attestor actualResponse = client.getAttestor(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2729/attestors/attestor-2729"; + client.getAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateAttestorTest() throws Exception { + Resources.Attestor expectedResponse = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + Resources.Attestor attestor = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + + Resources.Attestor actualResponse = client.updateAttestor(attestor); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void updateAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Resources.Attestor attestor = + Resources.Attestor.newBuilder() + .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) + .setDescription("description-1724546052") + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + client.updateAttestor(attestor); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest() throws Exception { + Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); + Service.ListAttestorsResponse expectedResponse = + Service.ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + ProjectName parent = ProjectName.of("[PROJECT]"); + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttestorsExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + ProjectName parent = ProjectName.of("[PROJECT]"); + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listAttestorsTest2() throws Exception { + Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); + Service.ListAttestorsResponse expectedResponse = + Service.ListAttestorsResponse.newBuilder() + .setNextPageToken("") + .addAllAttestors(Arrays.asList(responsesElement)) + .build(); + mockService.addResponse(expectedResponse); + + String parent = "projects/project-2353"; + + ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void listAttestorsExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String parent = "projects/project-2353"; + client.listAttestors(parent); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + + client.deleteAttestor(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAttestorExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteAttestorTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockService.addResponse(expectedResponse); + + String name = "projects/project-2729/attestors/attestor-2729"; + + client.deleteAttestor(name); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void deleteAttestorExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "projects/project-2729/attestors/attestor-2729"; + client.deleteAttestor(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java new file mode 100644 index 00000000..da870efb --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java @@ -0,0 +1,184 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.protobuf.Timestamp; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonSystemPolicyV1Stub; +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +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 SystemPolicyV1ClientHttpJsonTest { + private static MockHttpService mockService; + private static SystemPolicyV1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonSystemPolicyV1Stub.getMethodDescriptors(), + SystemPolicyV1Settings.getDefaultEndpoint()); + SystemPolicyV1Settings settings = + SystemPolicyV1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = SystemPolicyV1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void getSystemPolicyTest() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + + Resources.Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSystemPolicyExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + PolicyName name = PolicyName.ofLocationName("[LOCATION]"); + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getSystemPolicyTest2() throws Exception { + Resources.Policy expectedResponse = + Resources.Policy.newBuilder() + .setName(PolicyName.ofLocationName("[LOCATION]").toString()) + .setDescription("description-1724546052") + .addAllAdmissionWhitelistPatterns(new ArrayList()) + .putAllClusterAdmissionRules(new HashMap()) + .putAllKubernetesNamespaceAdmissionRules(new HashMap()) + .putAllKubernetesServiceAccountAdmissionRules( + new HashMap()) + .putAllIstioServiceIdentityAdmissionRules( + new HashMap()) + .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .build(); + mockService.addResponse(expectedResponse); + + String name = "locations/location-9731/policy"; + + Resources.Policy actualResponse = client.getSystemPolicy(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void getSystemPolicyExceptionTest2() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + String name = "locations/location-9731/policy"; + client.getSystemPolicy(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java new file mode 100644 index 00000000..52258265 --- /dev/null +++ b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java @@ -0,0 +1,131 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.testing.MockHttpService; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ApiException; +import com.google.api.gax.rpc.ApiExceptionFactory; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.testing.FakeStatusCode; +import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonValidationHelperV1Stub; +import io.grafeas.v1.AttestationOccurrence; +import java.io.IOException; +import java.util.List; +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 ValidationHelperV1ClientHttpJsonTest { + private static MockHttpService mockService; + private static ValidationHelperV1Client client; + + @BeforeClass + public static void startStaticServer() throws IOException { + mockService = + new MockHttpService( + HttpJsonValidationHelperV1Stub.getMethodDescriptors(), + ValidationHelperV1Settings.getDefaultEndpoint()); + ValidationHelperV1Settings settings = + ValidationHelperV1Settings.newHttpJsonBuilder() + .setTransportChannelProvider( + ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder() + .setHttpTransport(mockService) + .build()) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ValidationHelperV1Client.create(settings); + } + + @AfterClass + public static void stopServer() { + client.close(); + } + + @Before + public void setUp() {} + + @After + public void tearDown() throws Exception { + mockService.reset(); + } + + @Test + public void validateAttestationOccurrenceTest() throws Exception { + Service.ValidateAttestationOccurrenceResponse expectedResponse = + Service.ValidateAttestationOccurrenceResponse.newBuilder() + .setDenialReason("denialReason-966999989") + .build(); + mockService.addResponse(expectedResponse); + + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("projects/project-380/attestors/attestor-380") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + + Service.ValidateAttestationOccurrenceResponse actualResponse = + client.validateAttestationOccurrence(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockService.getRequestPaths(); + Assert.assertEquals(1, actualRequests.size()); + + String apiClientHeaderKey = + mockService + .getRequestHeaders() + .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) + .iterator() + .next(); + Assert.assertTrue( + GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() + .matcher(apiClientHeaderKey) + .matches()); + } + + @Test + public void validateAttestationOccurrenceExceptionTest() throws Exception { + ApiException exception = + ApiExceptionFactory.createException( + new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); + mockService.addException(exception); + + try { + Service.ValidateAttestationOccurrenceRequest request = + Service.ValidateAttestationOccurrenceRequest.newBuilder() + .setAttestor("projects/project-380/attestors/attestor-380") + .setAttestation(AttestationOccurrence.newBuilder().build()) + .setOccurrenceNote("occurrenceNote1722072419") + .setOccurrenceResourceUri("occurrenceResourceUri1001424877") + .build(); + client.validateAttestationOccurrence(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/owlbot.py b/owlbot.py index 77243461..27106a3c 100644 --- a/owlbot.py +++ b/owlbot.py @@ -21,4 +21,6 @@ s.move(library) s.remove_staging_dirs() -java.common_templates() \ No newline at end of file +java.common_templates(excludes=[ + '.kokoro/dependencies.sh', + ]) \ No newline at end of file diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..8d448f7a --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider1_sync] +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = + BinauthzManagementServiceV1Beta1Settings.newBuilder() + .setTransportChannelProvider( + BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() + .build()) + .build(); + BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = + BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..7cbf949f --- /dev/null +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.binaryauthorization.v1beta1.samples; + +// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider1_sync] +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; +import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = + SystemPolicyV1Beta1Settings.newBuilder() + .setTransportChannelProvider( + SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = + SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); + } +} +// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..3c5264bb --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,42 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider1_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = + BinauthzManagementServiceV1Settings.newBuilder() + .setTransportChannelProvider( + BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder() + .build()) + .build(); + BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = + BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); + } +} +// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..c89e1b96 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,40 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider1_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + SystemPolicyV1Settings systemPolicyV1Settings = + SystemPolicyV1Settings.newBuilder() + .setTransportChannelProvider( + SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); + } +} +// [END binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java new file mode 100644 index 00000000..20675342 --- /dev/null +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java @@ -0,0 +1,41 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; + +// [START binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider1_sync] +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; +import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; + +public class SyncCreateSetCredentialsProvider1 { + + public static void main(String[] args) throws Exception { + syncCreateSetCredentialsProvider1(); + } + + public static void syncCreateSetCredentialsProvider1() throws Exception { + // This snippet has been automatically generated for illustrative purposes only. + // It may require modifications to work in your environment. + ValidationHelperV1Settings validationHelperV1Settings = + ValidationHelperV1Settings.newBuilder() + .setTransportChannelProvider( + ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder().build()) + .build(); + ValidationHelperV1Client validationHelperV1Client = + ValidationHelperV1Client.create(validationHelperV1Settings); + } +} +// [END binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider1_sync] From e80b0a710d3d3710ab377d28d8cc68cb32b16223 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Fri, 1 Jul 2022 10:34:19 -0400 Subject: [PATCH 128/203] ci: removing clirr from required checks (#234) Making CLIRR not required. The version bumps are now controlled by the Release Please and OwlBot. The CL authors create appropriate change description to control major version bumps. --- .github/sync-repo-settings.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index 6f09d695..dd5626f3 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -11,7 +11,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (8) - units (11) - 'Kokoro - Test: Integration' @@ -26,7 +25,6 @@ branchProtectionRules: - dependencies (8) - dependencies (11) - lint - - clirr - units (7) - units (8) - units (11) From cb08e2cfb96e56e7e456e28929ae6109fd89c3ed Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:32:11 +0000 Subject: [PATCH 129/203] chore(main): release 1.2.0 (#228) :robot: I have created a release *beep* *boop* --- ## [1.2.0](https://github.com/googleapis/java-binary-authorization/compare/v1.1.1...v1.2.0) (2022-07-01) ### Features * Adds a pod_namespace field to pod events created by Continuous Validation, to distinguish pods with the same name that run in different namespaces ([#227](https://github.com/googleapis/java-binary-authorization/issues/227)) ([4755125](https://github.com/googleapis/java-binary-authorization/commit/4755125936bcf5931ea01e01e9fc6af3a7c1c309)) * Enable REST transport for most of Java and Go clients ([#230](https://github.com/googleapis/java-binary-authorization/issues/230)) ([ca507e6](https://github.com/googleapis/java-binary-authorization/commit/ca507e6aca8a35467d95038d7554c0c5f357315a)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#229](https://github.com/googleapis/java-binary-authorization/issues/229)) ([c5d1f10](https://github.com/googleapis/java-binary-authorization/commit/c5d1f103196a5d538e115d48f3873901fa0a065a)) * update dependency io.grafeas:grafeas to v2.3.1 ([#231](https://github.com/googleapis/java-binary-authorization/issues/231)) ([7374554](https://github.com/googleapis/java-binary-authorization/commit/73745540d6187af67f8fdd1029485a860c45d7a7)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 14 ++++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 41 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2515b5cb..b89b5b49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [1.2.0](https://github.com/googleapis/java-binary-authorization/compare/v1.1.1...v1.2.0) (2022-07-01) + + +### Features + +* Adds a pod_namespace field to pod events created by Continuous Validation, to distinguish pods with the same name that run in different namespaces ([#227](https://github.com/googleapis/java-binary-authorization/issues/227)) ([4755125](https://github.com/googleapis/java-binary-authorization/commit/4755125936bcf5931ea01e01e9fc6af3a7c1c309)) +* Enable REST transport for most of Java and Go clients ([#230](https://github.com/googleapis/java-binary-authorization/issues/230)) ([ca507e6](https://github.com/googleapis/java-binary-authorization/commit/ca507e6aca8a35467d95038d7554c0c5f357315a)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#229](https://github.com/googleapis/java-binary-authorization/issues/229)) ([c5d1f10](https://github.com/googleapis/java-binary-authorization/commit/c5d1f103196a5d538e115d48f3873901fa0a065a)) +* update dependency io.grafeas:grafeas to v2.3.1 ([#231](https://github.com/googleapis/java-binary-authorization/issues/231)) ([7374554](https://github.com/googleapis/java-binary-authorization/commit/73745540d6187af67f8fdd1029485a860c45d7a7)) + ### [1.1.1](https://github.com/googleapis/java-binary-authorization/compare/v1.1.0...v1.1.1) (2022-05-26) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 09588b87..12a5f7f6 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.1.2-SNAPSHOT + 1.2.0 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.2-SNAPSHOT + 1.2.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index ae74ec9d..233252ae 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.1.2-SNAPSHOT + 1.2.0 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.1.2-SNAPSHOT + 1.2.0 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f6818d00..41a44572 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.2-SNAPSHOT + 1.2.0 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 14db1ddc..7ad7d7e5 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.2-SNAPSHOT + 1.2.0 diff --git a/pom.xml b/pom.xml index 341a0850..4c741d2f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.1.2-SNAPSHOT + 1.2.0 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.1.2-SNAPSHOT + 1.2.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index ad4c99e9..3fba69a9 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.1.2-SNAPSHOT + 1.2.0 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.2-SNAPSHOT + 1.2.0 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 1da4d587..c05a06a7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.6.2-SNAPSHOT + 0.7.0 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.1.2-SNAPSHOT + 1.2.0 diff --git a/versions.txt b/versions.txt index 967742ed..d19e67ba 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.1.1:1.1.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.1.1:1.1.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.6.1:0.6.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.1.1:1.1.2-SNAPSHOT +google-cloud-binary-authorization:1.2.0:1.2.0 +grpc-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.0 +grpc-google-cloud-binary-authorization-v1:1.2.0:1.2.0 +proto-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.0 +proto-google-cloud-binary-authorization-v1:1.2.0:1.2.0 From 12b719ce975f1c3524195dcbcf7c98f48be5cce8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 1 Jul 2022 17:46:16 +0000 Subject: [PATCH 130/203] chore(main): release 1.2.1-SNAPSHOT (#236) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 12a5f7f6..6aba67a0 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.0 + 1.2.1-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.0 + 1.2.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 233252ae..3e86d266 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.0 + 1.2.1-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.0 + 1.2.1-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 41a44572..f81d1739 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 7ad7d7e5..12ec04fe 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index 4c741d2f..eb52b8ff 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.0 + 1.2.1-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.0 + 1.2.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 3fba69a9..638d634f 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.0 + 1.2.1-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index c05a06a7..0eec5efa 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.0 + 0.7.1-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.0 + 1.2.1-SNAPSHOT diff --git a/versions.txt b/versions.txt index d19e67ba..ccaf83e7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.0:1.2.0 -grpc-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.0 -grpc-google-cloud-binary-authorization-v1:1.2.0:1.2.0 -proto-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.0 -proto-google-cloud-binary-authorization-v1:1.2.0:1.2.0 +google-cloud-binary-authorization:1.2.0:1.2.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.1-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.0:1.2.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.1-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.0:1.2.1-SNAPSHOT From 6eede8ee6220f124868d1c32bfe43e800c757b17 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 8 Jul 2022 19:56:16 +0000 Subject: [PATCH 131/203] chore: fix minor typos in README and pom templates (#1479) (#239) Source-Link: https://github.com/googleapis/synthtool/commit/18d4e9bb50d0dfb3291de18c51b96a2c835e2446 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 --- .github/.OwlBot.lock.yaml | 4 ++-- README.md | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a454a61e..1b645c01 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6d4e3a15c62cfdcb823d60e16da7521e7c6fc00eba07c8ff12e4de9924a57d28 -# created: 2022-06-29T23:17:33.110417661Z + digest: sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 +# created: 2022-07-07T14:26:11.880812641Z diff --git a/README.md b/README.md index fb726425..eab926c5 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.1.1 + 1.2.0 ``` -If you are using Gradle without BOM, add this to your dependencies +If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.1.1' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.0' ``` -If you are using SBT, add this to your dependencies +If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.1.1" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.0" ``` ## Authentication From 69904688c291b31d0c7befd9c7dc5f47751e7752 Mon Sep 17 00:00:00 2001 From: Mridula <66699525+mpeddada1@users.noreply.github.com> Date: Mon, 11 Jul 2022 13:49:28 -0400 Subject: [PATCH 132/203] chore: add native image checks as required (#233) --- .github/sync-repo-settings.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml index dd5626f3..0501f63f 100644 --- a/.github/sync-repo-settings.yaml +++ b/.github/sync-repo-settings.yaml @@ -16,6 +16,8 @@ branchProtectionRules: - 'Kokoro - Test: Integration' - cla/google - OwlBot Post Processor + - 'Kokoro - Test: Java GraalVM Native Image' + - 'Kokoro - Test: Java 17 GraalVM Native Image' - pattern: java7 isAdminEnforced: true requiredApprovingReviewCount: 1 From 0e493142d7407632bde7b9fdf5a5e99ec80f9436 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jul 2022 19:49:38 +0200 Subject: [PATCH 133/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.1 (#237) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.1 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- google-cloud-binary-authorization-bom/pom.xml | 2 +- pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 6aba67a0..b53f9df9 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.0 + 1.5.1 Google Binary Authorization BOM diff --git a/pom.xml b/pom.xml index eb52b8ff..9ae4e15e 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.0 + 1.5.1 From 1854de1c74be723deab967e15708de1b20aaaa94 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 11 Jul 2022 19:49:49 +0200 Subject: [PATCH 134/203] deps: update dependency io.grafeas:grafeas to v2.4.0 (#238) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * deps: update dependency io.grafeas:grafeas to v2.4.0 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 9ae4e15e..43d5ea86 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.3.1 + 2.4.0 io.perfmark From 95fa61bb003ddf824f696e13fadde15cb5cf454f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:06:13 +0000 Subject: [PATCH 135/203] chore(main): release 1.2.1 (#240) :robot: I have created a release *beep* *boop* --- ## [1.2.1](https://github.com/googleapis/java-binary-authorization/compare/v1.2.0...v1.2.1) (2022-07-11) ### Dependencies * update dependency io.grafeas:grafeas to v2.4.0 ([#238](https://github.com/googleapis/java-binary-authorization/issues/238)) ([1854de1](https://github.com/googleapis/java-binary-authorization/commit/1854de1c74be723deab967e15708de1b20aaaa94)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b89b5b49..6aebba97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.1](https://github.com/googleapis/java-binary-authorization/compare/v1.2.0...v1.2.1) (2022-07-11) + + +### Dependencies + +* update dependency io.grafeas:grafeas to v2.4.0 ([#238](https://github.com/googleapis/java-binary-authorization/issues/238)) ([1854de1](https://github.com/googleapis/java-binary-authorization/commit/1854de1c74be723deab967e15708de1b20aaaa94)) + ## [1.2.0](https://github.com/googleapis/java-binary-authorization/compare/v1.1.1...v1.2.0) (2022-07-01) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index b53f9df9..fe094ac1 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.1-SNAPSHOT + 1.2.1 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.1-SNAPSHOT + 1.2.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 3e86d266..fab2b85b 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.1-SNAPSHOT + 1.2.1 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.1-SNAPSHOT + 1.2.1 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index f81d1739..bb85720b 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 12ec04fe..4a49faf6 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/pom.xml b/pom.xml index 43d5ea86..909353f0 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.1-SNAPSHOT + 1.2.1 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.1-SNAPSHOT + 1.2.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 638d634f..e966c661 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1-SNAPSHOT + 1.2.1 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 0eec5efa..712828dc 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1-SNAPSHOT + 0.7.1 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1-SNAPSHOT + 1.2.1 diff --git a/versions.txt b/versions.txt index ccaf83e7..1d259a73 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.0:1.2.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.1-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.0:1.2.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.0:0.7.1-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.0:1.2.1-SNAPSHOT +google-cloud-binary-authorization:1.2.1:1.2.1 +grpc-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.1 +grpc-google-cloud-binary-authorization-v1:1.2.1:1.2.1 +proto-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.1 +proto-google-cloud-binary-authorization-v1:1.2.1:1.2.1 From ef5e9886c31ab8d48fe08607be9aa6752672029b Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Mon, 11 Jul 2022 18:20:10 +0000 Subject: [PATCH 136/203] chore(main): release 1.2.2-SNAPSHOT (#241) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index fe094ac1..a820929e 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.1 + 1.2.2-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.1 + 1.2.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index fab2b85b..0741b599 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.1 + 1.2.2-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.1 + 1.2.2-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index bb85720b..0c1cfa6b 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 4a49faf6..180d7e83 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/pom.xml b/pom.xml index 909353f0..e605a261 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.1 + 1.2.2-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.1 + 1.2.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index e966c661..2a31432c 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.1 + 1.2.2-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 712828dc..2213156e 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.1 + 0.7.2-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.1 + 1.2.2-SNAPSHOT diff --git a/versions.txt b/versions.txt index 1d259a73..2c7b9266 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.1:1.2.1 -grpc-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.1 -grpc-google-cloud-binary-authorization-v1:1.2.1:1.2.1 -proto-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.1 -proto-google-cloud-binary-authorization-v1:1.2.1:1.2.1 +google-cloud-binary-authorization:1.2.1:1.2.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.2-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.1:1.2.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.2-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.1:1.2.2-SNAPSHOT From 8a01271a54b1160e22cfae302debe2e441cd6485 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 13 Jul 2022 19:26:16 +0000 Subject: [PATCH 137/203] fix: enable longpaths support for windows test (#1485) (#242) Source-Link: https://github.com/googleapis/synthtool/commit/73365620c41d96e97ff474b2c4d39b890ad51967 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/workflows/ci.yaml | 2 ++ README.md | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 1b645c01..de9173d9 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:f8374176dc59291f05dd3fec927a9da2cda687a9ef4de32e77f699a2be12ab45 -# created: 2022-07-07T14:26:11.880812641Z + digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 +# created: 2022-07-13T13:53:17.676447481Z diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 83ef7f9c..e3bb26e3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -39,6 +39,8 @@ jobs: windows: runs-on: windows-latest steps: + - name: Support longpaths + run: git config --system core.longpaths true - uses: actions/checkout@v3 - uses: actions/setup-java@v3 with: diff --git a/README.md b/README.md index eab926c5..b8dd7825 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.0 + 1.2.1 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.0' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.1' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.0" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.1" ``` ## Authentication From cdfc96ba9a98e77cce5237c0fa98719277eef1ce Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 18 Jul 2022 17:02:34 +0200 Subject: [PATCH 138/203] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.0 (#244) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.3.0` -> `3.4.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/compatibility-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.0/confidence-slim/3.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index e605a261..e7169dc6 100644 --- a/pom.xml +++ b/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.3.0 + 3.4.0 From de109a58e9beaa08a5f6721fa6498cd4463da61d Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 19 Jul 2022 13:38:20 +0000 Subject: [PATCH 139/203] ci: update template so GAPIC_AUTO repos do not require special approvers for Java code (#1494) (#245) Source-Link: https://github.com/googleapis/synthtool/commit/da89e53878d92467eb648c610e64f94a614915cc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 --- .github/.OwlBot.lock.yaml | 4 ++-- .github/CODEOWNERS | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de9173d9..6610882f 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 -# created: 2022-07-13T13:53:17.676447481Z + digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 +# created: 2022-07-18T21:44:23.94208526Z diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5f9903d5..1578dc2f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -6,7 +6,7 @@ # The @googleapis/aap-dpes is the default owner for changes in this repo * @googleapis/yoshi-java @googleapis/aap-dpes -**/*.java @googleapis/aap-dpes + # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers From c578a20a5aebd451d407685449518baeec6cbdd1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 19 Jul 2022 19:28:19 +0200 Subject: [PATCH 140/203] build(deps): update dependency org.apache.maven.plugins:maven-deploy-plugin to v3 (#246) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-deploy-plugin](https://maven.apache.org/plugins/) | `2.8.2` -> `3.0.0` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-deploy-plugin/3.0.0/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- samples/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/pom.xml b/samples/pom.xml index 89ccdc38..6e904ab9 100644 --- a/samples/pom.xml +++ b/samples/pom.xml @@ -38,7 +38,7 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.0.0 true From 923d1e3a64f08043eac647b99f965b29e193d111 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 2 Aug 2022 22:50:13 +0200 Subject: [PATCH 141/203] build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.5.3 (#248) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-config](https://togithub.com/googleapis/java-shared-config) | `1.5.1` -> `1.5.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/compatibility-slim/1.5.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-config/1.5.3/confidence-slim/1.5.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- google-cloud-binary-authorization-bom/pom.xml | 2 +- google-cloud-binary-authorization/pom.xml | 10 +++++----- pom.xml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index a820929e..d5ad62de 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -8,7 +8,7 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.3 Google Binary Authorization BOM diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 0741b599..b6901c0a 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -71,11 +71,6 @@ threetenbp - - io.grafeas - grafeas - - junit @@ -83,6 +78,11 @@ test 4.13.2 + + io.grafeas + grafeas + test + com.google.api.grpc diff --git a/pom.xml b/pom.xml index e7169dc6..b1a2c077 100644 --- a/pom.xml +++ b/pom.xml @@ -14,7 +14,7 @@ com.google.cloud google-cloud-shared-config - 1.5.1 + 1.5.3 From 3e9ea1fb7924148601cef4788cfe7d36543939b3 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 4 Aug 2022 21:00:20 +0200 Subject: [PATCH 142/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3 (#247) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `2.13.0` -> `3.0.1` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/compatibility-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.1/confidence-slim/2.13.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes

googleapis/java-shared-dependencies ### [`v3.0.1`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​301-httpsgithubcomgoogleapisjava-shared-dependenciescomparev300v301-2022-08-02) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.0...v3.0.1) ##### Dependencies - update dependency com.google.code.gson:gson to v2.9.1 ([#​766](https://togithub.com/googleapis/java-shared-dependencies/issues/766)) ([f7b2b06](https://togithub.com/googleapis/java-shared-dependencies/commit/f7b2b06b80e3e95ff8ab9b1d6a2638ef3069298a)) - update gax.version to v2.18.7 ([#​767](https://togithub.com/googleapis/java-shared-dependencies/issues/767)) ([9650368](https://togithub.com/googleapis/java-shared-dependencies/commit/96503682e98cdf348ea2c1365a03a60f4322c712)) - update google.core.version to v2.8.6 ([#​770](https://togithub.com/googleapis/java-shared-dependencies/issues/770)) ([cfd4377](https://togithub.com/googleapis/java-shared-dependencies/commit/cfd4377dc178cebb4724065d55d185ce03988d55)) ### [`v3.0.0`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​300-httpsgithubcomgoogleapisjava-shared-dependenciescomparev2130v300-2022-07-29) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v2.13.0...v3.0.0) ##### Bug Fixes - enable longpaths support for windows test ([#​1485](https://togithub.com/googleapis/java-shared-dependencies/issues/1485)) ([#​738](https://togithub.com/googleapis/java-shared-dependencies/issues/738)) ([11bc8f8](https://togithub.com/googleapis/java-shared-dependencies/commit/11bc8f81f28be88a97fdeafca21724e33638770c)) ##### Dependencies - update dependency com.google.api-client:google-api-client-bom to v1.35.2 ([#​729](https://togithub.com/googleapis/java-shared-dependencies/issues/729)) ([1fa59af](https://togithub.com/googleapis/java-shared-dependencies/commit/1fa59af80abb9f278f57658c10158567e825fec6)) - update dependency com.google.api-client:google-api-client-bom to v2 ([#​746](https://togithub.com/googleapis/java-shared-dependencies/issues/746)) ([2dcb2e0](https://togithub.com/googleapis/java-shared-dependencies/commit/2dcb2e071e0ba0eea21bb575bd13cd559d4a1ca6)) - update dependency com.google.api.grpc:grpc-google-common-protos to v2.9.2 ([#​741](https://togithub.com/googleapis/java-shared-dependencies/issues/741)) ([3352d6c](https://togithub.com/googleapis/java-shared-dependencies/commit/3352d6c36111c04e3f6f3e6360470fa3efb10d8f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.0 ([#​726](https://togithub.com/googleapis/java-shared-dependencies/issues/726)) ([2c5d64c](https://togithub.com/googleapis/java-shared-dependencies/commit/2c5d64c127db8384e49113acfeac6928716a2d7f)) - update dependency com.google.auth:google-auth-library-bom to v1.8.1 ([#​742](https://togithub.com/googleapis/java-shared-dependencies/issues/742)) ([4f53527](https://togithub.com/googleapis/java-shared-dependencies/commit/4f53527bda7f40896711b7c1d1c02453321ffbc8)) - update dependency com.google.cloud:first-party-dependencies to v2 ([#​747](https://togithub.com/googleapis/java-shared-dependencies/issues/747)) ([e970ac0](https://togithub.com/googleapis/java-shared-dependencies/commit/e970ac0599941c825dc2516146a7c6673e68a9b9)) - update dependency com.google.cloud:grpc-gcp to v1.2.1 ([#​751](https://togithub.com/googleapis/java-shared-dependencies/issues/751)) ([b3284b6](https://togithub.com/googleapis/java-shared-dependencies/commit/b3284b6ee52a96a6ea8696a05a94443df9ee5b9f)) - update dependency com.google.cloud:third-party-dependencies to v2 ([#​748](https://togithub.com/googleapis/java-shared-dependencies/issues/748)) ([573b41a](https://togithub.com/googleapis/java-shared-dependencies/commit/573b41a69504372741cbeb01dd200e7c71967186)) - update dependency com.google.http-client:google-http-client-bom to v1.42.1 ([#​730](https://togithub.com/googleapis/java-shared-dependencies/issues/730)) ([6b47126](https://togithub.com/googleapis/java-shared-dependencies/commit/6b47126686b603a5d112e097ce6aa3a1880daf6f)) - update dependency com.google.http-client:google-http-client-bom to v1.42.2 ([#​749](https://togithub.com/googleapis/java-shared-dependencies/issues/749)) ([299d7b0](https://togithub.com/googleapis/java-shared-dependencies/commit/299d7b0d4920644e2c3070d12dd1d97da17a5e88)) - update dependency com.google.protobuf:protobuf-bom to v3.21.2 ([#​722](https://togithub.com/googleapis/java-shared-dependencies/issues/722)) ([7a96b12](https://togithub.com/googleapis/java-shared-dependencies/commit/7a96b1259a526b63e9376fd6cc18b27cddeb5f0f)) - update dependency com.google.protobuf:protobuf-bom to v3.21.3 ([#​756](https://togithub.com/googleapis/java-shared-dependencies/issues/756)) ([3d0bac2](https://togithub.com/googleapis/java-shared-dependencies/commit/3d0bac23487aebb94267c0708f41ff6c02a028a4)) - update dependency com.google.protobuf:protobuf-bom to v3.21.4 ([#​759](https://togithub.com/googleapis/java-shared-dependencies/issues/759)) ([5a54ef1](https://togithub.com/googleapis/java-shared-dependencies/commit/5a54ef1a2d56244166d4fcc46041d62c0dc4b411)) - update dependency io.grpc:grpc-bom to v1.48.0 ([#​752](https://togithub.com/googleapis/java-shared-dependencies/issues/752)) ([20ac908](https://togithub.com/googleapis/java-shared-dependencies/commit/20ac908932a5e7c8e581bdfcd68579d7e1cedd5f)) - update dependency org.checkerframework:checker-qual to v3.23.0 ([#​736](https://togithub.com/googleapis/java-shared-dependencies/issues/736)) ([fc01d8f](https://togithub.com/googleapis/java-shared-dependencies/commit/fc01d8f93f391f12fdb800d5006f0b4505832eeb)) - update gax.version to v2.18.3 ([#​731](https://togithub.com/googleapis/java-shared-dependencies/issues/731)) ([e8ee554](https://togithub.com/googleapis/java-shared-dependencies/commit/e8ee554707acb2f71c739d08e2ff02fbe43ffa52)) - update gax.version to v2.18.4 ([#​735](https://togithub.com/googleapis/java-shared-dependencies/issues/735)) ([11c7415](https://togithub.com/googleapis/java-shared-dependencies/commit/11c74152a84697924de3a0e838b05f606c3098f7)) - update gax.version to v2.18.5 ([#​758](https://togithub.com/googleapis/java-shared-dependencies/issues/758)) ([7469fc1](https://togithub.com/googleapis/java-shared-dependencies/commit/7469fc1cc5095b39a5738e60156711a268f6e052)) - update gax.version to v2.18.6 ([#​763](https://togithub.com/googleapis/java-shared-dependencies/issues/763)) ([b5ca2f7](https://togithub.com/googleapis/java-shared-dependencies/commit/b5ca2f7b4d81c705823253f4f03363a32d2be48b)) - update google.common-protos.version to v2.9.1 ([#​724](https://togithub.com/googleapis/java-shared-dependencies/issues/724)) ([5213dbb](https://togithub.com/googleapis/java-shared-dependencies/commit/5213dbbfa9c9b73d2420ec2be7782f16c9c4955f)) - update google.core.version to v2.8.1 ([#​725](https://togithub.com/googleapis/java-shared-dependencies/issues/725)) ([575858a](https://togithub.com/googleapis/java-shared-dependencies/commit/575858a60f76e46bbc2a2435c2b6c01c8f4ab681)) - update google.core.version to v2.8.3 ([#​760](https://togithub.com/googleapis/java-shared-dependencies/issues/760)) ([cb10ae4](https://togithub.com/googleapis/java-shared-dependencies/commit/cb10ae4b76939215ea465af74163b3d4ad65a548)) - update google.core.version to v2.8.4 ([#​762](https://togithub.com/googleapis/java-shared-dependencies/issues/762)) ([821daaf](https://togithub.com/googleapis/java-shared-dependencies/commit/821daafefdbcfdfe6e363e580747538096a562ef)) - update google.core.version to v2.8.5 ([#​764](https://togithub.com/googleapis/java-shared-dependencies/issues/764)) ([a1f8f50](https://togithub.com/googleapis/java-shared-dependencies/commit/a1f8f501b54143a2cec8e72efd4ceb3ce47f13ae)) - update iam.version to v1.5.0 ([#​732](https://togithub.com/googleapis/java-shared-dependencies/issues/732)) ([9dce0e5](https://togithub.com/googleapis/java-shared-dependencies/commit/9dce0e5199c1e425119adc804304958f58003a27)) - update iam.version to v1.5.1 ([#​737](https://togithub.com/googleapis/java-shared-dependencies/issues/737)) ([df39168](https://togithub.com/googleapis/java-shared-dependencies/commit/df391685d42fcb1b04f03ab1380a594893bdce37)) - update iam.version to v1.5.2 ([#​743](https://togithub.com/googleapis/java-shared-dependencies/issues/743)) ([cdde697](https://togithub.com/googleapis/java-shared-dependencies/commit/cdde697f25a89fc8c2ec7eae6b7c54f69977bb1c))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b1a2c077..fa86a7b4 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.4.0 + 2.4.3 io.perfmark @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 2.13.0 + 3.0.1 pom import From 7b43a28d6e114a8c4f0dcdba9959e4e8bfa41a13 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 9 Aug 2022 17:02:15 +0000 Subject: [PATCH 143/203] chore(main): release 1.2.2 (#243) :robot: I have created a release *beep* *boop* --- ## [1.2.2](https://github.com/googleapis/java-binary-authorization/compare/v1.2.1...v1.2.2) (2022-08-04) ### Bug Fixes * enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-binary-authorization/issues/1485)) ([#242](https://github.com/googleapis/java-binary-authorization/issues/242)) ([8a01271](https://github.com/googleapis/java-binary-authorization/commit/8a01271a54b1160e22cfae302debe2e441cd6485)) ### Dependencies * update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#247](https://github.com/googleapis/java-binary-authorization/issues/247)) ([3e9ea1f](https://github.com/googleapis/java-binary-authorization/commit/3e9ea1fb7924148601cef4788cfe7d36543939b3)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 12 ++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 39 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6aebba97..cf5c5e83 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # Changelog +## [1.2.2](https://github.com/googleapis/java-binary-authorization/compare/v1.2.1...v1.2.2) (2022-08-04) + + +### Bug Fixes + +* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-binary-authorization/issues/1485)) ([#242](https://github.com/googleapis/java-binary-authorization/issues/242)) ([8a01271](https://github.com/googleapis/java-binary-authorization/commit/8a01271a54b1160e22cfae302debe2e441cd6485)) + + +### Dependencies + +* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#247](https://github.com/googleapis/java-binary-authorization/issues/247)) ([3e9ea1f](https://github.com/googleapis/java-binary-authorization/commit/3e9ea1fb7924148601cef4788cfe7d36543939b3)) + ## [1.2.1](https://github.com/googleapis/java-binary-authorization/compare/v1.2.0...v1.2.1) (2022-07-11) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index d5ad62de..64d687d4 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.2-SNAPSHOT + 1.2.2 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.2-SNAPSHOT + 1.2.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index b6901c0a..4d8898a9 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.2-SNAPSHOT + 1.2.2 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.2-SNAPSHOT + 1.2.2 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 0c1cfa6b..98d58346 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 180d7e83..ad5831ed 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/pom.xml b/pom.xml index fa86a7b4..ed304c7a 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.2-SNAPSHOT + 1.2.2 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.2-SNAPSHOT + 1.2.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 2a31432c..8c02c712 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2-SNAPSHOT + 1.2.2 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 2213156e..41ba29c7 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2-SNAPSHOT + 0.7.2 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2-SNAPSHOT + 1.2.2 diff --git a/versions.txt b/versions.txt index 2c7b9266..f8531ef5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.1:1.2.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.2-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.1:1.2.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.1:0.7.2-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.1:1.2.2-SNAPSHOT +google-cloud-binary-authorization:1.2.2:1.2.2 +grpc-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.2 +grpc-google-cloud-binary-authorization-v1:1.2.2:1.2.2 +proto-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.2 +proto-google-cloud-binary-authorization-v1:1.2.2:1.2.2 From f76e876facc17319638bbc4b87f19941a5acc707 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 11 Aug 2022 13:42:10 -0400 Subject: [PATCH 144/203] fix: grafeas is runtime scope (#251) Fixing https://github.com/googleapis/java-binary-authorization/commit/923d1e3a64f08043eac647b99f965b29e193d111#diff-45adf8a0bb72b6c10f96e40ab9362cc2c67d5400d27ce69d414d817b357c3daaR84 --- README.md | 6 +++--- google-cloud-binary-authorization/pom.xml | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index b8dd7825..bd383110 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.1 + 1.2.2 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.1' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.2' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.1" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.2" ``` ## Authentication diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 4d8898a9..dabd4634 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -70,6 +70,11 @@ org.threeten threetenbp + + io.grafeas + grafeas + runtime + @@ -78,11 +83,6 @@ test 4.13.2 - - io.grafeas - grafeas - test - com.google.api.grpc From e022c1ffc1f2d12c59d29e4892f674d6b203a6fa Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 15:51:12 -0400 Subject: [PATCH 145/203] chore(main): release 1.2.3-SNAPSHOT (#250) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 64d687d4..18e85942 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.2 + 1.2.3-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index dabd4634..304880ca 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.2 + 1.2.3-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.2 + 1.2.3-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 98d58346..8e1a817e 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index ad5831ed..6941b4f1 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/pom.xml b/pom.xml index ed304c7a..0602389d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.2 + 1.2.3-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 8c02c712..244f3fd2 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.2 + 1.2.3-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 41ba29c7..4a1f2327 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.2 + 0.7.3-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.2 + 1.2.3-SNAPSHOT diff --git a/versions.txt b/versions.txt index f8531ef5..bcbe10f5 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.2:1.2.2 -grpc-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.2 -grpc-google-cloud-binary-authorization-v1:1.2.2:1.2.2 -proto-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.2 -proto-google-cloud-binary-authorization-v1:1.2.2:1.2.2 +google-cloud-binary-authorization:1.2.2:1.2.3-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.3-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.2:1.2.3-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.3-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.2:1.2.3-SNAPSHOT From 2381e5b1f0954e0b779cd9726e37153232b7bc9f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 20:58:16 +0000 Subject: [PATCH 146/203] chore(main): release 1.2.3 (#252) :robot: I have created a release *beep* *boop* --- ## [1.2.3](https://github.com/googleapis/java-binary-authorization/compare/v1.2.2...v1.2.3) (2022-08-11) ### Bug Fixes * grafeas is runtime scope ([#251](https://github.com/googleapis/java-binary-authorization/issues/251)) ([f76e876](https://github.com/googleapis/java-binary-authorization/commit/f76e876facc17319638bbc4b87f19941a5acc707)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf5c5e83..e4265dc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.3](https://github.com/googleapis/java-binary-authorization/compare/v1.2.2...v1.2.3) (2022-08-11) + + +### Bug Fixes + +* grafeas is runtime scope ([#251](https://github.com/googleapis/java-binary-authorization/issues/251)) ([f76e876](https://github.com/googleapis/java-binary-authorization/commit/f76e876facc17319638bbc4b87f19941a5acc707)) + ## [1.2.2](https://github.com/googleapis/java-binary-authorization/compare/v1.2.1...v1.2.2) (2022-08-04) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 18e85942..b1d8e14c 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.3-SNAPSHOT + 1.2.3 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 304880ca..3eff6e7b 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.3-SNAPSHOT + 1.2.3 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.3-SNAPSHOT + 1.2.3 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 8e1a817e..d1d6cafe 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 6941b4f1..7c50842f 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/pom.xml b/pom.xml index 0602389d..d0fac8cd 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.3-SNAPSHOT + 1.2.3 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 244f3fd2..54bd44f8 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3-SNAPSHOT + 1.2.3 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 4a1f2327..4c2f0762 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3-SNAPSHOT + 0.7.3 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3-SNAPSHOT + 1.2.3 diff --git a/versions.txt b/versions.txt index bcbe10f5..77d13a1b 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.2:1.2.3-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.3-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.2:1.2.3-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.2:0.7.3-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.2:1.2.3-SNAPSHOT +google-cloud-binary-authorization:1.2.3:1.2.3 +grpc-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.3 +grpc-google-cloud-binary-authorization-v1:1.2.3:1.2.3 +proto-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.3 +proto-google-cloud-binary-authorization-v1:1.2.3:1.2.3 From daad582fac23f6d76593b78be1af182b59593ff0 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 11 Aug 2022 21:36:15 +0000 Subject: [PATCH 147/203] chore(main): release 1.2.4-SNAPSHOT (#253) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index b1d8e14c..0ca65e66 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.3 + 1.2.4-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.3 + 1.2.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 3eff6e7b..e6d8c460 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.3 + 1.2.4-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.3 + 1.2.4-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index d1d6cafe..62338bed 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3 + 1.2.4-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 7c50842f..5bd94807 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3 + 1.2.4-SNAPSHOT diff --git a/pom.xml b/pom.xml index d0fac8cd..e17c2d2b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.3 + 1.2.4-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.3 + 1.2.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 54bd44f8..1873391c 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.3 + 1.2.4-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3 + 1.2.4-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 4c2f0762..96d02f90 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.3 + 0.7.4-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.3 + 1.2.4-SNAPSHOT diff --git a/versions.txt b/versions.txt index 77d13a1b..33df1e1a 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.3:1.2.3 -grpc-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.3 -grpc-google-cloud-binary-authorization-v1:1.2.3:1.2.3 -proto-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.3 -proto-google-cloud-binary-authorization-v1:1.2.3:1.2.3 +google-cloud-binary-authorization:1.2.3:1.2.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.4-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.3:1.2.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.4-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.3:1.2.4-SNAPSHOT From 4d4e0e1a4401a804d7317336f78c298e9b7408d7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 20:30:16 +0200 Subject: [PATCH 148/203] build(deps): update dependency org.apache.maven.plugins:maven-project-info-reports-plugin to v3.4.1 (#255) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-project-info-reports-plugin](https://maven.apache.org/plugins/) | `3.4.0` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/compatibility-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-project-info-reports-plugin/3.4.1/confidence-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bd383110..90425249 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.2 + 1.2.3 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.2' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.3' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.2" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.3" ``` ## Authentication diff --git a/pom.xml b/pom.xml index e17c2d2b..8c62d32a 100644 --- a/pom.xml +++ b/pom.xml @@ -134,7 +134,7 @@ org.apache.maven.plugins maven-project-info-reports-plugin - 3.4.0 + 3.4.1 From 06b0dc35929d11755cf376bcc8da1c25b0ceae52 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 16 Aug 2022 21:12:21 +0200 Subject: [PATCH 149/203] build(deps): update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3.4.1 (#254) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [org.apache.maven.plugins:maven-javadoc-plugin](https://maven.apache.org/plugins/) | `3.4.0` -> `3.4.1` | [![age](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/compatibility-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/org.apache.maven.plugins:maven-javadoc-plugin/3.4.1/confidence-slim/3.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 8c62d32a..bdccb7a2 100644 --- a/pom.xml +++ b/pom.xml @@ -161,7 +161,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 html From e4e478b13ba38d4706c2772eb917e2a9c5638b05 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 22 Aug 2022 14:20:30 +0000 Subject: [PATCH 150/203] chore: remove unused proto imports (#256) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 468735472 Source-Link: https://github.com/googleapis/googleapis/commit/cfa1b3782da7ccae31673d45401a0b79d2d4a84b Source-Link: https://github.com/googleapis/googleapis-gen/commit/09b7666656510f5b00b893f003a0ba5766f9e250 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDliNzY2NjY1NjUxMGY1YjAwYjg5M2YwMDNhMGJhNTc2NmY5ZTI1MCJ9 --- .../binaryauthorization/v1/Resources.java | 191 +++++++++-------- .../binaryauthorization/v1/resources.proto | 1 - .../BinaryAuthorizationResourcesProto.java | 195 +++++++++--------- .../v1beta1/resources.proto | 1 - 4 files changed, 190 insertions(+), 198 deletions(-) diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java index 6277f6f6..edfb6596 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java @@ -14354,101 +14354,100 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "sources.proto\022#google.cloud.binaryauthor" + "ization.v1\032\037google/api/field_behavior.pr" + "oto\032\031google/api/resource.proto\032\037google/p" - + "rotobuf/timestamp.proto\032\034google/api/anno" - + "tations.proto\"\370\014\n\006Policy\022\021\n\004name\030\001 \001(\tB\003" - + "\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022r\n\035global_" - + "policy_evaluation_mode\030\007 \001(\0162F.google.cl" - + "oud.binaryauthorization.v1.Policy.Global" - + "PolicyEvaluationModeB\003\340A\001\022i\n\034admission_w" - + "hitelist_patterns\030\002 \003(\0132>.google.cloud.b" - + "inaryauthorization.v1.AdmissionWhitelist" - + "PatternB\003\340A\001\022l\n\027cluster_admission_rules\030" - + "\003 \003(\0132F.google.cloud.binaryauthorization" - + ".v1.Policy.ClusterAdmissionRulesEntryB\003\340" - + "A\001\022\205\001\n$kubernetes_namespace_admission_ru" - + "les\030\n \003(\0132R.google.cloud.binaryauthoriza" - + "tion.v1.Policy.KubernetesNamespaceAdmiss" - + "ionRulesEntryB\003\340A\001\022\220\001\n*kubernetes_servic" - + "e_account_admission_rules\030\010 \003(\0132W.google" - + ".cloud.binaryauthorization.v1.Policy.Kub" - + "ernetesServiceAccountAdmissionRulesEntry" - + "B\003\340A\001\022\210\001\n&istio_service_identity_admissi" - + "on_rules\030\t \003(\0132S.google.cloud.binaryauth" - + "orization.v1.Policy.IstioServiceIdentity" - + "AdmissionRulesEntryB\003\340A\001\022W\n\026default_admi" - + "ssion_rule\030\004 \001(\01322.google.cloud.binaryau" - + "thorization.v1.AdmissionRuleB\003\340A\002\0224\n\013upd" - + "ate_time\030\005 \001(\0132\032.google.protobuf.Timesta" - + "mpB\003\340A\003\032p\n\032ClusterAdmissionRulesEntry\022\013\n" - + "\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.google.cloud" - + ".binaryauthorization.v1.AdmissionRule:\0028" - + "\001\032|\n&KubernetesNamespaceAdmissionRulesEn" - + "try\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.google" - + ".cloud.binaryauthorization.v1.AdmissionR" - + "ule:\0028\001\032\201\001\n+KubernetesServiceAccountAdmi" - + "ssionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 " - + "\001(\01322.google.cloud.binaryauthorization.v" - + "1.AdmissionRule:\0028\001\032}\n\'IstioServiceIdent" - + "ityAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005v" - + "alue\030\002 \001(\01322.google.cloud.binaryauthoriz" - + "ation.v1.AdmissionRule:\0028\001\"d\n\032GlobalPoli" - + "cyEvaluationMode\022-\n)GLOBAL_POLICY_EVALUA" - + "TION_MODE_UNSPECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007D" - + "ISABLE\020\002:f\352Ac\n)binaryauthorization.googl" - + "eapis.com/Policy\022\031projects/{project}/pol" - + "icy\022\033locations/{location}/policy\"1\n\031Admi" - + "ssionWhitelistPattern\022\024\n\014name_pattern\030\001 " - + "\001(\t\"\332\003\n\rAdmissionRule\022_\n\017evaluation_mode" - + "\030\001 \001(\0162A.google.cloud.binaryauthorizatio" - + "n.v1.AdmissionRule.EvaluationModeB\003\340A\002\022$" - + "\n\027require_attestations_by\030\002 \003(\tB\003\340A\001\022a\n\020" - + "enforcement_mode\030\003 \001(\0162B.google.cloud.bi" - + "naryauthorization.v1.AdmissionRule.Enfor" - + "cementModeB\003\340A\002\"m\n\016EvaluationMode\022\037\n\033EVA" - + "LUATION_MODE_UNSPECIFIED\020\000\022\020\n\014ALWAYS_ALL" - + "OW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013ALWAYS_" - + "DENY\020\003\"p\n\017EnforcementMode\022 \n\034ENFORCEMENT" - + "_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCED_BLOCK_AN" - + "D_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG_ONLY\020\002" - + "\"\267\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013desc" - + "ription\030\006 \001(\tB\003\340A\001\022\\\n\027user_owned_grafeas" - + "_note\030\003 \001(\01329.google.cloud.binaryauthori" - + "zation.v1.UserOwnedGrafeasNoteH\000\0224\n\013upda" - + "te_time\030\004 \001(\0132\032.google.protobuf.Timestam" - + "pB\003\340A\003:Y\352AV\n+binaryauthorization.googlea" - + "pis.com/Attestor\022\'projects/{project}/att" - + "estors/{attestor}B\017\n\rattestor_type\"\264\001\n\024U" - + "serOwnedGrafeasNote\022\033\n\016note_reference\030\001 " - + "\001(\tB\003\340A\002\022P\n\013public_keys\030\002 \003(\01326.google.c" - + "loud.binaryauthorization.v1.AttestorPubl" - + "icKeyB\003\340A\001\022-\n delegation_service_account" - + "_email\030\003 \001(\tB\003\340A\003\"\277\004\n\rPkixPublicKey\022\026\n\016p" - + "ublic_key_pem\030\001 \001(\t\022b\n\023signature_algorit" - + "hm\030\002 \001(\0162E.google.cloud.binaryauthorizat" - + "ion.v1.PkixPublicKey.SignatureAlgorithm\"" - + "\261\003\n\022SignatureAlgorithm\022#\n\037SIGNATURE_ALGO" - + "RITHM_UNSPECIFIED\020\000\022\027\n\023RSA_PSS_2048_SHA2" - + "56\020\001\022\027\n\023RSA_PSS_3072_SHA256\020\002\022\027\n\023RSA_PSS" - + "_4096_SHA256\020\003\022\027\n\023RSA_PSS_4096_SHA512\020\004\022" - + "\036\n\032RSA_SIGN_PKCS1_2048_SHA256\020\005\022\036\n\032RSA_S" - + "IGN_PKCS1_3072_SHA256\020\006\022\036\n\032RSA_SIGN_PKCS" - + "1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_PKCS1_4096_S" - + "HA512\020\010\022\025\n\021ECDSA_P256_SHA256\020\t\022\027\n\023EC_SIG" - + "N_P256_SHA256\020\t\022\025\n\021ECDSA_P384_SHA384\020\n\022\027" - + "\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021ECDSA_P521_SH" - + "A512\020\013\022\027\n\023EC_SIGN_P521_SHA512\020\013\032\002\020\001\"\272\001\n\021" - + "AttestorPublicKey\022\024\n\007comment\030\001 \001(\tB\003\340A\001\022" - + "\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored_pgp_public_" - + "key\030\003 \001(\tH\000\022M\n\017pkix_public_key\030\005 \001(\01322.g" - + "oogle.cloud.binaryauthorization.v1.PkixP" - + "ublicKeyH\000B\014\n\npublic_keyB\211\002\n5com.google." - + "protos.google.cloud.binaryauthorization." - + "v1P\000ZVgoogle.golang.org/genproto/googlea" - + "pis/cloud/binaryauthorization/v1;binarya" - + "uthorization\370\001\001\252\002#Google.Cloud.BinaryAut" - + "horization.V1\312\002#Google\\Cloud\\BinaryAutho" - + "rization\\V1\352\002&Google::Cloud::BinaryAutho" - + "rization::V1b\006proto3" + + "rotobuf/timestamp.proto\"\370\014\n\006Policy\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022" + + "r\n\035global_policy_evaluation_mode\030\007 \001(\0162F" + + ".google.cloud.binaryauthorization.v1.Pol" + + "icy.GlobalPolicyEvaluationModeB\003\340A\001\022i\n\034a" + + "dmission_whitelist_patterns\030\002 \003(\0132>.goog" + + "le.cloud.binaryauthorization.v1.Admissio" + + "nWhitelistPatternB\003\340A\001\022l\n\027cluster_admiss" + + "ion_rules\030\003 \003(\0132F.google.cloud.binaryaut" + + "horization.v1.Policy.ClusterAdmissionRul" + + "esEntryB\003\340A\001\022\205\001\n$kubernetes_namespace_ad" + + "mission_rules\030\n \003(\0132R.google.cloud.binar" + + "yauthorization.v1.Policy.KubernetesNames" + + "paceAdmissionRulesEntryB\003\340A\001\022\220\001\n*kuberne" + + "tes_service_account_admission_rules\030\010 \003(" + + "\0132W.google.cloud.binaryauthorization.v1." + + "Policy.KubernetesServiceAccountAdmission" + + "RulesEntryB\003\340A\001\022\210\001\n&istio_service_identi" + + "ty_admission_rules\030\t \003(\0132S.google.cloud." + + "binaryauthorization.v1.Policy.IstioServi" + + "ceIdentityAdmissionRulesEntryB\003\340A\001\022W\n\026de" + + "fault_admission_rule\030\004 \001(\01322.google.clou" + + "d.binaryauthorization.v1.AdmissionRuleB\003" + + "\340A\002\0224\n\013update_time\030\005 \001(\0132\032.google.protob" + + "uf.TimestampB\003\340A\003\032p\n\032ClusterAdmissionRul" + + "esEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.go" + + "ogle.cloud.binaryauthorization.v1.Admiss" + + "ionRule:\0028\001\032|\n&KubernetesNamespaceAdmiss" + + "ionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(" + + "\01322.google.cloud.binaryauthorization.v1." + + "AdmissionRule:\0028\001\032\201\001\n+KubernetesServiceA" + + "ccountAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022A" + + "\n\005value\030\002 \001(\01322.google.cloud.binaryautho" + + "rization.v1.AdmissionRule:\0028\001\032}\n\'IstioSe" + + "rviceIdentityAdmissionRulesEntry\022\013\n\003key\030" + + "\001 \001(\t\022A\n\005value\030\002 \001(\01322.google.cloud.bina" + + "ryauthorization.v1.AdmissionRule:\0028\001\"d\n\032" + + "GlobalPolicyEvaluationMode\022-\n)GLOBAL_POL" + + "ICY_EVALUATION_MODE_UNSPECIFIED\020\000\022\n\n\006ENA" + + "BLE\020\001\022\013\n\007DISABLE\020\002:f\352Ac\n)binaryauthoriza" + + "tion.googleapis.com/Policy\022\031projects/{pr" + + "oject}/policy\022\033locations/{location}/poli" + + "cy\"1\n\031AdmissionWhitelistPattern\022\024\n\014name_" + + "pattern\030\001 \001(\t\"\332\003\n\rAdmissionRule\022_\n\017evalu" + + "ation_mode\030\001 \001(\0162A.google.cloud.binaryau" + + "thorization.v1.AdmissionRule.EvaluationM" + + "odeB\003\340A\002\022$\n\027require_attestations_by\030\002 \003(" + + "\tB\003\340A\001\022a\n\020enforcement_mode\030\003 \001(\0162B.googl" + + "e.cloud.binaryauthorization.v1.Admission" + + "Rule.EnforcementModeB\003\340A\002\"m\n\016EvaluationM" + + "ode\022\037\n\033EVALUATION_MODE_UNSPECIFIED\020\000\022\020\n\014" + + "ALWAYS_ALLOW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022" + + "\017\n\013ALWAYS_DENY\020\003\"p\n\017EnforcementMode\022 \n\034E" + + "NFORCEMENT_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCE" + + "D_BLOCK_AND_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_" + + "LOG_ONLY\020\002\"\267\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340" + + "A\002\022\030\n\013description\030\006 \001(\tB\003\340A\001\022\\\n\027user_own" + + "ed_grafeas_note\030\003 \001(\01329.google.cloud.bin" + + "aryauthorization.v1.UserOwnedGrafeasNote" + + "H\000\0224\n\013update_time\030\004 \001(\0132\032.google.protobu" + + "f.TimestampB\003\340A\003:Y\352AV\n+binaryauthorizati" + + "on.googleapis.com/Attestor\022\'projects/{pr" + + "oject}/attestors/{attestor}B\017\n\rattestor_" + + "type\"\264\001\n\024UserOwnedGrafeasNote\022\033\n\016note_re" + + "ference\030\001 \001(\tB\003\340A\002\022P\n\013public_keys\030\002 \003(\0132" + + "6.google.cloud.binaryauthorization.v1.At" + + "testorPublicKeyB\003\340A\001\022-\n delegation_servi" + + "ce_account_email\030\003 \001(\tB\003\340A\003\"\277\004\n\rPkixPubl" + + "icKey\022\026\n\016public_key_pem\030\001 \001(\t\022b\n\023signatu" + + "re_algorithm\030\002 \001(\0162E.google.cloud.binary" + + "authorization.v1.PkixPublicKey.Signature" + + "Algorithm\"\261\003\n\022SignatureAlgorithm\022#\n\037SIGN" + + "ATURE_ALGORITHM_UNSPECIFIED\020\000\022\027\n\023RSA_PSS" + + "_2048_SHA256\020\001\022\027\n\023RSA_PSS_3072_SHA256\020\002\022" + + "\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023RSA_PSS_4096" + + "_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_2048_SHA256\020" + + "\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032RSA" + + "_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_PK" + + "CS1_4096_SHA512\020\010\022\025\n\021ECDSA_P256_SHA256\020\t" + + "\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n\021ECDSA_P384_" + + "SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021ECD" + + "SA_P521_SHA512\020\013\022\027\n\023EC_SIGN_P521_SHA512\020" + + "\013\032\002\020\001\"\272\001\n\021AttestorPublicKey\022\024\n\007comment\030\001" + + " \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored_p" + + "gp_public_key\030\003 \001(\tH\000\022M\n\017pkix_public_key" + + "\030\005 \001(\01322.google.cloud.binaryauthorizatio" + + "n.v1.PkixPublicKeyH\000B\014\n\npublic_keyB\211\002\n5c" + + "om.google.protos.google.cloud.binaryauth" + + "orization.v1P\000ZVgoogle.golang.org/genpro" + + "to/googleapis/cloud/binaryauthorization/" + + "v1;binaryauthorization\370\001\001\252\002#Google.Cloud" + + ".BinaryAuthorization.V1\312\002#Google\\Cloud\\B" + + "inaryAuthorization\\V1\352\002&Google::Cloud::B" + + "inaryAuthorization::V1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -14457,7 +14456,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor = getDescriptor().getMessageTypes().get(0); @@ -14573,7 +14571,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto index 9d72a9f0..5df7f58b 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto +++ b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto @@ -19,7 +19,6 @@ package google.cloud.binaryauthorization.v1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1"; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java index 0b18140c..d8298681 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java @@ -84,105 +84,104 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "a1/resources.proto\022(google.cloud.binarya" + "uthorization.v1beta1\032\037google/api/field_b" + "ehavior.proto\032\031google/api/resource.proto" - + "\032\037google/protobuf/timestamp.proto\032\034googl" - + "e/api/annotations.proto\"\261\r\n\006Policy\022\021\n\004na" - + "me\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022" - + "w\n\035global_policy_evaluation_mode\030\007 \001(\0162K" - + ".google.cloud.binaryauthorization.v1beta" - + "1.Policy.GlobalPolicyEvaluationModeB\003\340A\001" - + "\022n\n\034admission_whitelist_patterns\030\002 \003(\0132C" - + ".google.cloud.binaryauthorization.v1beta" - + "1.AdmissionWhitelistPatternB\003\340A\001\022q\n\027clus" - + "ter_admission_rules\030\003 \003(\0132K.google.cloud" - + ".binaryauthorization.v1beta1.Policy.Clus" - + "terAdmissionRulesEntryB\003\340A\001\022\212\001\n$kubernet" - + "es_namespace_admission_rules\030\n \003(\0132W.goo" - + "gle.cloud.binaryauthorization.v1beta1.Po" - + "licy.KubernetesNamespaceAdmissionRulesEn" - + "tryB\003\340A\001\022\225\001\n*kubernetes_service_account_" - + "admission_rules\030\010 \003(\0132\\.google.cloud.bin" - + "aryauthorization.v1beta1.Policy.Kubernet" - + "esServiceAccountAdmissionRulesEntryB\003\340A\001" - + "\022\215\001\n&istio_service_identity_admission_ru" - + "les\030\t \003(\0132X.google.cloud.binaryauthoriza" - + "tion.v1beta1.Policy.IstioServiceIdentity" - + "AdmissionRulesEntryB\003\340A\001\022\\\n\026default_admi" - + "ssion_rule\030\004 \001(\01327.google.cloud.binaryau" - + "thorization.v1beta1.AdmissionRuleB\003\340A\002\0224" - + "\n\013update_time\030\005 \001(\0132\032.google.protobuf.Ti" - + "mestampB\003\340A\003\032u\n\032ClusterAdmissionRulesEnt" - + "ry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google." - + "cloud.binaryauthorization.v1beta1.Admiss" - + "ionRule:\0028\001\032\201\001\n&KubernetesNamespaceAdmis" + + "\032\037google/protobuf/timestamp.proto\"\261\r\n\006Po" + + "licy\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006" + + " \001(\tB\003\340A\001\022w\n\035global_policy_evaluation_mo" + + "de\030\007 \001(\0162K.google.cloud.binaryauthorizat" + + "ion.v1beta1.Policy.GlobalPolicyEvaluatio" + + "nModeB\003\340A\001\022n\n\034admission_whitelist_patter" + + "ns\030\002 \003(\0132C.google.cloud.binaryauthorizat" + + "ion.v1beta1.AdmissionWhitelistPatternB\003\340" + + "A\001\022q\n\027cluster_admission_rules\030\003 \003(\0132K.go" + + "ogle.cloud.binaryauthorization.v1beta1.P" + + "olicy.ClusterAdmissionRulesEntryB\003\340A\001\022\212\001" + + "\n$kubernetes_namespace_admission_rules\030\n" + + " \003(\0132W.google.cloud.binaryauthorization." + + "v1beta1.Policy.KubernetesNamespaceAdmiss" + + "ionRulesEntryB\003\340A\001\022\225\001\n*kubernetes_servic" + + "e_account_admission_rules\030\010 \003(\0132\\.google" + + ".cloud.binaryauthorization.v1beta1.Polic" + + "y.KubernetesServiceAccountAdmissionRules" + + "EntryB\003\340A\001\022\215\001\n&istio_service_identity_ad" + + "mission_rules\030\t \003(\0132X.google.cloud.binar" + + "yauthorization.v1beta1.Policy.IstioServi" + + "ceIdentityAdmissionRulesEntryB\003\340A\001\022\\\n\026de" + + "fault_admission_rule\030\004 \001(\01327.google.clou" + + "d.binaryauthorization.v1beta1.AdmissionR" + + "uleB\003\340A\002\0224\n\013update_time\030\005 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\032u\n\032ClusterAdmissi" + + "onRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\013" + + "27.google.cloud.binaryauthorization.v1be" + + "ta1.AdmissionRule:\0028\001\032\201\001\n&KubernetesName" + + "spaceAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n" + + "\005value\030\002 \001(\01327.google.cloud.binaryauthor" + + "ization.v1beta1.AdmissionRule:\0028\001\032\206\001\n+Ku" + + "bernetesServiceAccountAdmissionRulesEntr" + + "y\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google.c" + + "loud.binaryauthorization.v1beta1.Admissi" + + "onRule:\0028\001\032\202\001\n\'IstioServiceIdentityAdmis" + "sionRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001" + "(\01327.google.cloud.binaryauthorization.v1" - + "beta1.AdmissionRule:\0028\001\032\206\001\n+KubernetesSe" - + "rviceAccountAdmissionRulesEntry\022\013\n\003key\030\001" - + " \001(\t\022F\n\005value\030\002 \001(\01327.google.cloud.binar" - + "yauthorization.v1beta1.AdmissionRule:\0028\001" - + "\032\202\001\n\'IstioServiceIdentityAdmissionRulesE" - + "ntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.googl" - + "e.cloud.binaryauthorization.v1beta1.Admi" - + "ssionRule:\0028\001\"d\n\032GlobalPolicyEvaluationM" - + "ode\022-\n)GLOBAL_POLICY_EVALUATION_MODE_UNS" - + "PECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007DISABLE\020\002:f\352Ac" - + "\n)binaryauthorization.googleapis.com/Pol" - + "icy\022\031projects/{project}/policy\022\033location" - + "s/{location}/policy\"1\n\031AdmissionWhitelis" - + "tPattern\022\024\n\014name_pattern\030\001 \001(\t\"\344\003\n\rAdmis" - + "sionRule\022d\n\017evaluation_mode\030\001 \001(\0162F.goog" - + "le.cloud.binaryauthorization.v1beta1.Adm" - + "issionRule.EvaluationModeB\003\340A\002\022$\n\027requir" - + "e_attestations_by\030\002 \003(\tB\003\340A\001\022f\n\020enforcem" - + "ent_mode\030\003 \001(\0162G.google.cloud.binaryauth" - + "orization.v1beta1.AdmissionRule.Enforcem" - + "entModeB\003\340A\002\"m\n\016EvaluationMode\022\037\n\033EVALUA" - + "TION_MODE_UNSPECIFIED\020\000\022\020\n\014ALWAYS_ALLOW\020" - + "\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013ALWAYS_DEN" - + "Y\020\003\"p\n\017EnforcementMode\022 \n\034ENFORCEMENT_MO" - + "DE_UNSPECIFIED\020\000\022 \n\034ENFORCED_BLOCK_AND_A" - + "UDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG_ONLY\020\002\"\274\002" - + "\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\030\n\013descrip" - + "tion\030\006 \001(\tB\003\340A\001\022a\n\027user_owned_drydock_no" - + "te\030\003 \001(\0132>.google.cloud.binaryauthorizat" - + "ion.v1beta1.UserOwnedDrydockNoteH\000\0224\n\013up" - + "date_time\030\004 \001(\0132\032.google.protobuf.Timest" - + "ampB\003\340A\003:Y\352AV\n+binaryauthorization.googl" - + "eapis.com/Attestor\022\'projects/{project}/a" - + "ttestors/{attestor}B\017\n\rattestor_type\"\271\001\n" - + "\024UserOwnedDrydockNote\022\033\n\016note_reference\030" - + "\001 \001(\tB\003\340A\002\022U\n\013public_keys\030\002 \003(\0132;.google" - + ".cloud.binaryauthorization.v1beta1.Attes" - + "torPublicKeyB\003\340A\001\022-\n delegation_service_" - + "account_email\030\003 \001(\tB\003\340A\003\"\304\004\n\rPkixPublicK" - + "ey\022\026\n\016public_key_pem\030\001 \001(\t\022g\n\023signature_" - + "algorithm\030\002 \001(\0162J.google.cloud.binaryaut" - + "horization.v1beta1.PkixPublicKey.Signatu" - + "reAlgorithm\"\261\003\n\022SignatureAlgorithm\022#\n\037SI" - + "GNATURE_ALGORITHM_UNSPECIFIED\020\000\022\027\n\023RSA_P" - + "SS_2048_SHA256\020\001\022\027\n\023RSA_PSS_3072_SHA256\020" - + "\002\022\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023RSA_PSS_40" - + "96_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_2048_SHA25" - + "6\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032R" - + "SA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_" - + "PKCS1_4096_SHA512\020\010\022\025\n\021ECDSA_P256_SHA256" - + "\020\t\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n\021ECDSA_P38" - + "4_SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021E" - + "CDSA_P521_SHA512\020\013\022\027\n\023EC_SIGN_P521_SHA51" - + "2\020\013\032\002\020\001\"\277\001\n\021AttestorPublicKey\022\024\n\007comment" - + "\030\001 \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored" - + "_pgp_public_key\030\003 \001(\tH\000\022R\n\017pkix_public_k" - + "ey\030\005 \001(\01327.google.cloud.binaryauthorizat" - + "ion.v1beta1.PkixPublicKeyH\000B\014\n\npublic_ke" - + "yB\267\002\n,com.google.cloud.binaryauthorizati" - + "on.v1beta1B!BinaryAuthorizationResources" - + "ProtoP\001Z[google.golang.org/genproto/goog" - + "leapis/cloud/binaryauthorization/v1beta1" - + ";binaryauthorization\370\001\001\252\002(Google.Cloud.B" - + "inaryAuthorization.V1Beta1\312\002(Google\\Clou" - + "d\\BinaryAuthorization\\V1beta1\352\002+Google::" - + "Cloud::BinaryAuthorization::V1beta1b\006pro" - + "to3" + + "beta1.AdmissionRule:\0028\001\"d\n\032GlobalPolicyE" + + "valuationMode\022-\n)GLOBAL_POLICY_EVALUATIO" + + "N_MODE_UNSPECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007DISA" + + "BLE\020\002:f\352Ac\n)binaryauthorization.googleap" + + "is.com/Policy\022\031projects/{project}/policy" + + "\022\033locations/{location}/policy\"1\n\031Admissi" + + "onWhitelistPattern\022\024\n\014name_pattern\030\001 \001(\t" + + "\"\344\003\n\rAdmissionRule\022d\n\017evaluation_mode\030\001 " + + "\001(\0162F.google.cloud.binaryauthorization.v" + + "1beta1.AdmissionRule.EvaluationModeB\003\340A\002" + + "\022$\n\027require_attestations_by\030\002 \003(\tB\003\340A\001\022f" + + "\n\020enforcement_mode\030\003 \001(\0162G.google.cloud." + + "binaryauthorization.v1beta1.AdmissionRul" + + "e.EnforcementModeB\003\340A\002\"m\n\016EvaluationMode" + + "\022\037\n\033EVALUATION_MODE_UNSPECIFIED\020\000\022\020\n\014ALW" + + "AYS_ALLOW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013" + + "ALWAYS_DENY\020\003\"p\n\017EnforcementMode\022 \n\034ENFO" + + "RCEMENT_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCED_B" + + "LOCK_AND_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG" + + "_ONLY\020\002\"\274\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" + + "\030\n\013description\030\006 \001(\tB\003\340A\001\022a\n\027user_owned_" + + "drydock_note\030\003 \001(\0132>.google.cloud.binary" + + "authorization.v1beta1.UserOwnedDrydockNo" + + "teH\000\0224\n\013update_time\030\004 \001(\0132\032.google.proto" + + "buf.TimestampB\003\340A\003:Y\352AV\n+binaryauthoriza" + + "tion.googleapis.com/Attestor\022\'projects/{" + + "project}/attestors/{attestor}B\017\n\rattesto" + + "r_type\"\271\001\n\024UserOwnedDrydockNote\022\033\n\016note_" + + "reference\030\001 \001(\tB\003\340A\002\022U\n\013public_keys\030\002 \003(" + + "\0132;.google.cloud.binaryauthorization.v1b" + + "eta1.AttestorPublicKeyB\003\340A\001\022-\n delegatio" + + "n_service_account_email\030\003 \001(\tB\003\340A\003\"\304\004\n\rP" + + "kixPublicKey\022\026\n\016public_key_pem\030\001 \001(\t\022g\n\023" + + "signature_algorithm\030\002 \001(\0162J.google.cloud" + + ".binaryauthorization.v1beta1.PkixPublicK" + + "ey.SignatureAlgorithm\"\261\003\n\022SignatureAlgor" + + "ithm\022#\n\037SIGNATURE_ALGORITHM_UNSPECIFIED\020" + + "\000\022\027\n\023RSA_PSS_2048_SHA256\020\001\022\027\n\023RSA_PSS_30" + + "72_SHA256\020\002\022\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023" + + "RSA_PSS_4096_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_" + + "2048_SHA256\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA" + + "256\020\006\022\036\n\032RSA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n" + + "\032RSA_SIGN_PKCS1_4096_SHA512\020\010\022\025\n\021ECDSA_P" + + "256_SHA256\020\t\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n" + + "\021ECDSA_P384_SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA" + + "384\020\n\022\025\n\021ECDSA_P521_SHA512\020\013\022\027\n\023EC_SIGN_" + + "P521_SHA512\020\013\032\002\020\001\"\277\001\n\021AttestorPublicKey\022" + + "\024\n\007comment\030\001 \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034asc" + + "ii_armored_pgp_public_key\030\003 \001(\tH\000\022R\n\017pki" + + "x_public_key\030\005 \001(\01327.google.cloud.binary" + + "authorization.v1beta1.PkixPublicKeyH\000B\014\n" + + "\npublic_keyB\267\002\n,com.google.cloud.binarya" + + "uthorization.v1beta1B!BinaryAuthorizatio" + + "nResourcesProtoP\001Z[google.golang.org/gen" + + "proto/googleapis/cloud/binaryauthorizati" + + "on/v1beta1;binaryauthorization\370\001\001\252\002(Goog" + + "le.Cloud.BinaryAuthorization.V1Beta1\312\002(G" + + "oogle\\Cloud\\BinaryAuthorization\\V1beta1\352" + + "\002+Google::Cloud::BinaryAuthorization::V1" + + "beta1b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -191,7 +190,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(), com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.api.AnnotationsProto.getDescriptor(), }); internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor = getDescriptor().getMessageTypes().get(0); @@ -307,7 +305,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.FieldBehaviorProto.getDescriptor(); com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.api.AnnotationsProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto index 3e5b638f..28c18f99 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto @@ -19,7 +19,6 @@ package google.cloud.binaryauthorization.v1beta1; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1"; From 4c821131fc5a8aed8f9e86231115c6f1d283b512 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 9 Sep 2022 05:44:27 +0200 Subject: [PATCH 151/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 (#258) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.1` -> `3.0.2` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/compatibility-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.2/confidence-slim/3.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v3.0.2`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​302-httpsgithubcomgoogleapisjava-shared-dependenciescomparev301v302-2022-09-08) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.1...v3.0.2) ##### Dependencies - Update dependency com.fasterxml.jackson:jackson-bom to v2.13.4 ([#​789](https://togithub.com/googleapis/java-shared-dependencies/issues/789)) ([6cf91a9](https://togithub.com/googleapis/java-shared-dependencies/commit/6cf91a96b9ea6af0fb845b50582dac7aa2892cab)) - Update dependency com.google.auth:google-auth-library-bom to v1.10.0 ([#​781](https://togithub.com/googleapis/java-shared-dependencies/issues/781)) ([8859e61](https://togithub.com/googleapis/java-shared-dependencies/commit/8859e61808bfc5cd9546e27e945fc855b36d2554)) - Update dependency com.google.auth:google-auth-library-bom to v1.11.0 ([#​790](https://togithub.com/googleapis/java-shared-dependencies/issues/790)) ([3431a47](https://togithub.com/googleapis/java-shared-dependencies/commit/3431a471cbf874a67a4f1a42e31f0ed891dedc92)) - Update dependency com.google.auth:google-auth-library-bom to v1.9.0 ([#​773](https://togithub.com/googleapis/java-shared-dependencies/issues/773)) ([27fc79f](https://togithub.com/googleapis/java-shared-dependencies/commit/27fc79f00ee70011df6a368bb8fcfad7f0ce41f0)) - Update dependency com.google.errorprone:error_prone_annotations to v2.15.0 ([#​776](https://togithub.com/googleapis/java-shared-dependencies/issues/776)) ([bf333b8](https://togithub.com/googleapis/java-shared-dependencies/commit/bf333b8c88072d21cb959db4d3328bbb55d9ef5c)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.5 ([#​780](https://togithub.com/googleapis/java-shared-dependencies/issues/780)) ([da7f44d](https://togithub.com/googleapis/java-shared-dependencies/commit/da7f44d71d6d7f372b5313dab68ce220308614d4)) - Update dependency io.grpc:grpc-bom to v1.48.1 ([#​768](https://togithub.com/googleapis/java-shared-dependencies/issues/768)) ([5c7768d](https://togithub.com/googleapis/java-shared-dependencies/commit/5c7768d3c9665dd356de6c39c0a6a5fa6e992f2e)) - Update dependency io.grpc:grpc-bom to v1.49.0 ([#​786](https://togithub.com/googleapis/java-shared-dependencies/issues/786)) ([8734812](https://togithub.com/googleapis/java-shared-dependencies/commit/8734812f1b4e2faaa48caf41eff59a85892ae344)) - Update dependency org.checkerframework:checker-qual to v3.24.0 ([#​775](https://togithub.com/googleapis/java-shared-dependencies/issues/775)) ([df74b7b](https://togithub.com/googleapis/java-shared-dependencies/commit/df74b7b0dd5dd592523f302d9fb36adb5991cb0b)) - Update dependency org.checkerframework:checker-qual to v3.25.0 ([#​788](https://togithub.com/googleapis/java-shared-dependencies/issues/788)) ([207035b](https://togithub.com/googleapis/java-shared-dependencies/commit/207035bd04c9305899eea540acbefaf06a7b1ec9)) - Update dependency org.threeten:threetenbp to v1.6.1 ([#​782](https://togithub.com/googleapis/java-shared-dependencies/issues/782)) ([0f218ae](https://togithub.com/googleapis/java-shared-dependencies/commit/0f218aeb6aa33cf1da4a8b1d6c82bbf87946dab9)) - Update gax.version to v2.19.0 ([#​785](https://togithub.com/googleapis/java-shared-dependencies/issues/785)) ([4448331](https://togithub.com/googleapis/java-shared-dependencies/commit/4448331c4c6d88ea8076260776d1d47d24aa19fa)) - Update google.core.version to v2.8.10 ([#​787](https://togithub.com/googleapis/java-shared-dependencies/issues/787)) ([3c344d5](https://togithub.com/googleapis/java-shared-dependencies/commit/3c344d515e3b9215db5a1f8ef550d800d974e558)) - Update google.core.version to v2.8.7 ([#​774](https://togithub.com/googleapis/java-shared-dependencies/issues/774)) ([d0cd5e8](https://togithub.com/googleapis/java-shared-dependencies/commit/d0cd5e8f6ca88787fe0dbf7f30c849cb4c4fae5e)) - Update google.core.version to v2.8.8 ([#​777](https://togithub.com/googleapis/java-shared-dependencies/issues/777)) ([f00571c](https://togithub.com/googleapis/java-shared-dependencies/commit/f00571cd1e9f1c4e011fba4a1e1674c1d8d60200)) - Update google.core.version to v2.8.9 ([#​784](https://togithub.com/googleapis/java-shared-dependencies/issues/784)) ([aa8e505](https://togithub.com/googleapis/java-shared-dependencies/commit/aa8e505dbb1214b2239e55d5ac83b00c167d77e4))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index bdccb7a2..a3d56926 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.0.1 + 3.0.2 pom import From 44d8c1be362d6b5a792c3060ee53c45ddfefb4de Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 04:26:19 +0000 Subject: [PATCH 152/203] chore(main): release 1.2.4 (#259) :robot: I have created a release *beep* *boop* --- ## [1.2.4](https://github.com/googleapis/java-binary-authorization/compare/v1.2.3...v1.2.4) (2022-09-09) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#258](https://github.com/googleapis/java-binary-authorization/issues/258)) ([4c82113](https://github.com/googleapis/java-binary-authorization/commit/4c821131fc5a8aed8f9e86231115c6f1d283b512)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4265dc9..46695325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.4](https://github.com/googleapis/java-binary-authorization/compare/v1.2.3...v1.2.4) (2022-09-09) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#258](https://github.com/googleapis/java-binary-authorization/issues/258)) ([4c82113](https://github.com/googleapis/java-binary-authorization/commit/4c821131fc5a8aed8f9e86231115c6f1d283b512)) + ## [1.2.3](https://github.com/googleapis/java-binary-authorization/compare/v1.2.2...v1.2.3) (2022-08-11) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 0ca65e66..01fea7eb 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.4-SNAPSHOT + 1.2.4 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.4-SNAPSHOT + 1.2.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index e6d8c460..03cac83a 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.4-SNAPSHOT + 1.2.4 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.4-SNAPSHOT + 1.2.4 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 62338bed..2bc5a46f 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.4-SNAPSHOT + 1.2.4 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 5bd94807..f9d29dc8 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.4-SNAPSHOT + 1.2.4 diff --git a/pom.xml b/pom.xml index a3d56926..1e3897f8 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.4-SNAPSHOT + 1.2.4 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.4-SNAPSHOT + 1.2.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 1873391c..a2bb1cd1 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.4-SNAPSHOT + 1.2.4 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.4-SNAPSHOT + 1.2.4 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 96d02f90..5f56952c 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.4-SNAPSHOT + 0.7.4 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.4-SNAPSHOT + 1.2.4 diff --git a/versions.txt b/versions.txt index 33df1e1a..df0a08e2 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.3:1.2.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.4-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.3:1.2.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.3:0.7.4-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.3:1.2.4-SNAPSHOT +google-cloud-binary-authorization:1.2.4:1.2.4 +grpc-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.4 +grpc-google-cloud-binary-authorization-v1:1.2.4:1.2.4 +proto-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.4 +proto-google-cloud-binary-authorization-v1:1.2.4:1.2.4 From b53dab1c3f2a2929180d4d8493b5cb22f1ae35bf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 9 Sep 2022 14:48:18 +0000 Subject: [PATCH 153/203] chore(bazel): Update WORKSPACE files for rules_gapic, gax_java, generator_java versions (#257) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 472750037 Source-Link: https://github.com/googleapis/googleapis/commit/88f2ea3f53b9712f2e04f28f06210f6f77fa7e24 Source-Link: https://github.com/googleapis/googleapis-gen/commit/230a5588306aae18fe8f2a57f14d4039ad72c901 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjMwYTU1ODgzMDZhYWUxOGZlOGYyYTU3ZjE0ZDQwMzlhZDcyYzkwMSJ9 --- ...inauthzManagementServiceV1Beta1Client.java | 217 +++++++++++++----- ...authzManagementServiceV1Beta1Settings.java | 7 +- .../v1beta1/SystemPolicyV1Beta1Client.java | 56 +++-- .../v1beta1/SystemPolicyV1Beta1Settings.java | 7 +- .../v1beta1/package-info.java | 14 +- ...zManagementServiceV1Beta1StubSettings.java | 7 +- ...nBinauthzManagementServiceV1Beta1Stub.java | 7 +- .../stub/SystemPolicyV1Beta1StubSettings.java | 7 +- .../v1/BinauthzManagementServiceV1Client.java | 217 +++++++++++++----- .../BinauthzManagementServiceV1Settings.java | 7 +- .../v1/SystemPolicyV1Client.java | 56 +++-- .../v1/SystemPolicyV1Settings.java | 12 +- .../v1/ValidationHelperV1Client.java | 42 +++- .../v1/ValidationHelperV1Settings.java | 7 +- .../binaryauthorization/v1/package-info.java | 21 +- ...nauthzManagementServiceV1StubSettings.java | 7 +- ...tpJsonBinauthzManagementServiceV1Stub.java | 7 +- .../stub/HttpJsonValidationHelperV1Stub.java | 2 +- .../v1/stub/SystemPolicyV1StubSettings.java | 12 +- .../stub/ValidationHelperV1StubSettings.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../createattestor/AsyncCreateAttestor.java | 7 +- .../createattestor/SyncCreateAttestor.java | 7 +- ...eateAttestorProjectnameStringAttestor.java | 7 +- ...yncCreateAttestorStringStringAttestor.java | 7 +- .../deleteattestor/AsyncDeleteAttestor.java | 7 +- .../deleteattestor/SyncDeleteAttestor.java | 7 +- .../SyncDeleteAttestorAttestorname.java | 7 +- .../SyncDeleteAttestorString.java | 7 +- .../getattestor/AsyncGetAttestor.java | 7 +- .../getattestor/SyncGetAttestor.java | 7 +- .../SyncGetAttestorAttestorname.java | 7 +- .../getattestor/SyncGetAttestorString.java | 7 +- .../getpolicy/AsyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicyPolicyname.java | 7 +- .../getpolicy/SyncGetPolicyString.java | 7 +- .../listattestors/AsyncListAttestors.java | 7 +- .../AsyncListAttestorsPaged.java | 7 +- .../listattestors/SyncListAttestors.java | 7 +- .../SyncListAttestorsProjectname.java | 7 +- .../SyncListAttestorsString.java | 7 +- .../updateattestor/AsyncUpdateAttestor.java | 7 +- .../updateattestor/SyncUpdateAttestor.java | 7 +- .../SyncUpdateAttestorAttestor.java | 7 +- .../updatepolicy/AsyncUpdatePolicy.java | 7 +- .../updatepolicy/SyncUpdatePolicy.java | 7 +- .../updatepolicy/SyncUpdatePolicyPolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../getsystempolicy/AsyncGetSystemPolicy.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 7 +- .../SyncGetSystemPolicyPolicyname.java | 7 +- .../SyncGetSystemPolicyString.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../createattestor/AsyncCreateAttestor.java | 7 +- .../createattestor/SyncCreateAttestor.java | 7 +- ...torProjectnameStringResourcesattestor.java | 7 +- ...AttestorStringStringResourcesattestor.java | 7 +- .../deleteattestor/AsyncDeleteAttestor.java | 7 +- .../deleteattestor/SyncDeleteAttestor.java | 7 +- .../SyncDeleteAttestorAttestorname.java | 7 +- .../SyncDeleteAttestorString.java | 7 +- .../getattestor/AsyncGetAttestor.java | 7 +- .../getattestor/SyncGetAttestor.java | 7 +- .../SyncGetAttestorAttestorname.java | 7 +- .../getattestor/SyncGetAttestorString.java | 7 +- .../getpolicy/AsyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicyPolicyname.java | 7 +- .../getpolicy/SyncGetPolicyString.java | 7 +- .../listattestors/AsyncListAttestors.java | 7 +- .../AsyncListAttestorsPaged.java | 7 +- .../listattestors/SyncListAttestors.java | 7 +- .../SyncListAttestorsProjectname.java | 7 +- .../SyncListAttestorsString.java | 7 +- .../updateattestor/AsyncUpdateAttestor.java | 7 +- .../updateattestor/SyncUpdateAttestor.java | 7 +- .../SyncUpdateAttestorResourcesattestor.java | 7 +- .../updatepolicy/AsyncUpdatePolicy.java | 7 +- .../updatepolicy/SyncUpdatePolicy.java | 7 +- .../SyncUpdatePolicyResourcespolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getpolicy/SyncGetPolicy.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 12 +- .../SyncValidateAttestationOccurrence.java | 7 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../getsystempolicy/AsyncGetSystemPolicy.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 7 +- .../SyncGetSystemPolicyPolicyname.java | 7 +- .../SyncGetSystemPolicyString.java | 7 +- .../getsystempolicy/SyncGetSystemPolicy.java | 12 +- .../SyncCreateSetCredentialsProvider.java | 7 +- .../SyncCreateSetCredentialsProvider1.java | 7 +- .../create/SyncCreateSetEndpoint.java | 7 +- .../AsyncValidateAttestationOccurrence.java | 7 +- .../SyncValidateAttestationOccurrence.java | 7 +- .../SyncValidateAttestationOccurrence.java | 7 +- 109 files changed, 953 insertions(+), 399 deletions(-) diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index 925ebfa0..ac731ce0 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -50,8 +50,11 @@ * calls that map to API methods. Sample code to get started: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -89,8 +92,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
  *     BinauthzManagementServiceV1Beta1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -102,8 +108,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
  *     BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
@@ -114,8 +123,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
  *     BinauthzManagementServiceV1Beta1Settings.newBuilder()
  *         .setTransportChannelProvider(
@@ -198,8 +210,11 @@ public BinauthzManagementServiceV1Beta1Stub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -232,8 +247,11 @@ public final Policy getPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
@@ -265,8 +283,11 @@ public final Policy getPolicy(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetPolicyRequest request =
@@ -298,8 +319,11 @@ public final Policy getPolicy(GetPolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetPolicyRequest request =
@@ -328,8 +352,11 @@ public final UnaryCallable getPolicyCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   Policy policy = Policy.newBuilder().build();
@@ -359,8 +386,11 @@ public final Policy updatePolicy(Policy policy) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdatePolicyRequest request =
@@ -387,8 +417,11 @@ public final Policy updatePolicy(UpdatePolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdatePolicyRequest request =
@@ -414,8 +447,11 @@ public final UnaryCallable updatePolicyCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -456,8 +492,11 @@ public final Attestor createAttestor(ProjectName parent, String attestorId, Atte
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -498,8 +537,11 @@ public final Attestor createAttestor(String parent, String attestorId, Attestor
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   CreateAttestorRequest request =
@@ -529,8 +571,11 @@ public final Attestor createAttestor(CreateAttestorRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   CreateAttestorRequest request =
@@ -558,8 +603,11 @@ public final UnaryCallable createAttestorCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -586,8 +634,11 @@ public final Attestor getAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -613,8 +664,11 @@ public final Attestor getAttestor(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetAttestorRequest request =
@@ -640,8 +694,11 @@ public final Attestor getAttestor(GetAttestorRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   GetAttestorRequest request =
@@ -667,8 +724,11 @@ public final UnaryCallable getAttestorCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   Attestor attestor = Attestor.newBuilder().build();
@@ -696,8 +756,11 @@ public final Attestor updateAttestor(Attestor attestor) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdateAttestorRequest request =
@@ -721,8 +784,11 @@ public final Attestor updateAttestor(UpdateAttestorRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   UpdateAttestorRequest request =
@@ -746,8 +812,11 @@ public final UnaryCallable updateAttestorCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -779,8 +848,11 @@ public final ListAttestorsPagedResponse listAttestors(ProjectName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -809,8 +881,11 @@ public final ListAttestorsPagedResponse listAttestors(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -841,8 +916,11 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -873,8 +951,11 @@ public final ListAttestorsPagedResponse listAttestors(ListAttestorsRequest reque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   ListAttestorsRequest request =
@@ -911,8 +992,11 @@ public final UnaryCallable listAtte
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -939,8 +1023,11 @@ public final void deleteAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -966,8 +1053,11 @@ public final void deleteAttestor(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   DeleteAttestorRequest request =
@@ -993,8 +1083,11 @@ public final void deleteAttestor(DeleteAttestorRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
    *     BinauthzManagementServiceV1Beta1Client.create()) {
    *   DeleteAttestorRequest request =
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
index 46d41dfa..797d50d7 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java
@@ -55,8 +55,11 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Beta1Settings.Builder
  *     binauthzManagementServiceV1Beta1SettingsBuilder =
  *         BinauthzManagementServiceV1Beta1Settings.newBuilder();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
index a3017bbd..2ee56b43 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java
@@ -33,8 +33,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
  *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -71,8 +74,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
  *     SystemPolicyV1Beta1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -84,8 +90,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
  *     SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
@@ -96,8 +105,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
  *     SystemPolicyV1Beta1Settings.newBuilder()
  *         .setTransportChannelProvider(
@@ -167,8 +179,11 @@ public SystemPolicyV1Beta1Stub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
    *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -192,8 +207,11 @@ public final Policy getSystemPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
    *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
@@ -216,8 +234,11 @@ public final Policy getSystemPolicy(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   GetSystemPolicyRequest request =
    *       GetSystemPolicyRequest.newBuilder()
@@ -241,8 +262,11 @@ public final Policy getSystemPolicy(GetSystemPolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
    *   GetSystemPolicyRequest request =
    *       GetSystemPolicyRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
index 1508441e..177285a3 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java
@@ -51,8 +51,11 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder =
  *     SystemPolicyV1Beta1Settings.newBuilder();
  * systemPolicyV1Beta1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
index c9ab463f..606b96af 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java
@@ -32,8 +32,11 @@
  * 

Sample for BinauthzManagementServiceV1Beta1Client: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
  *     BinauthzManagementServiceV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -48,8 +51,11 @@
  * 

Sample for SystemPolicyV1Beta1Client: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
  *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
  *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
index b600d3c5..fce0b673 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java
@@ -82,8 +82,11 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Beta1StubSettings.Builder
  *     binauthzManagementServiceV1Beta1SettingsBuilder =
  *         BinauthzManagementServiceV1Beta1StubSettings.newBuilder();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java
index 16697201..91810f99 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java
@@ -123,7 +123,8 @@ public class HttpJsonBinauthzManagementServiceV1Beta1Stub
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("policy", request.getPolicy()))
+                              ProtoRestSerializer.create()
+                                  .toBody("policy", request.getPolicy(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -161,7 +162,7 @@ public class HttpJsonBinauthzManagementServiceV1Beta1Stub
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attestor", request.getAttestor()))
+                                  .toBody("attestor", request.getAttestor(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -233,7 +234,7 @@ public class HttpJsonBinauthzManagementServiceV1Beta1Stub
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attestor", request.getAttestor()))
+                                  .toBody("attestor", request.getAttestor(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
index 2bdfab50..06258538 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java
@@ -63,8 +63,11 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
  *     SystemPolicyV1Beta1StubSettings.newBuilder();
  * systemPolicyV1Beta1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
index cdff3097..f1e5de92 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java
@@ -49,8 +49,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
  *     BinauthzManagementServiceV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -88,8 +91,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
  *     BinauthzManagementServiceV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -101,8 +107,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
  *     BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
@@ -113,8 +122,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
  *     BinauthzManagementServiceV1Settings.newBuilder()
  *         .setTransportChannelProvider(
@@ -193,8 +205,11 @@ public BinauthzManagementServiceV1Stub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -228,8 +243,11 @@ public final Resources.Policy getPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
@@ -260,8 +278,11 @@ public final Resources.Policy getPolicy(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetPolicyRequest request =
@@ -292,8 +313,11 @@ public final Resources.Policy getPolicy(Service.GetPolicyRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetPolicyRequest request =
@@ -322,8 +346,11 @@ public final UnaryCallable getPolicy
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Resources.Policy policy = Resources.Policy.newBuilder().build();
@@ -354,8 +381,11 @@ public final Resources.Policy updatePolicy(Resources.Policy policy) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdatePolicyRequest request =
@@ -384,8 +414,11 @@ public final Resources.Policy updatePolicy(Service.UpdatePolicyRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdatePolicyRequest request =
@@ -413,8 +446,11 @@ public final UnaryCallable update
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -455,8 +491,11 @@ public final Resources.Attestor createAttestor(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -497,8 +536,11 @@ public final Resources.Attestor createAttestor(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.CreateAttestorRequest request =
@@ -528,8 +570,11 @@ public final Resources.Attestor createAttestor(Service.CreateAttestorRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.CreateAttestorRequest request =
@@ -558,8 +603,11 @@ public final Resources.Attestor createAttestor(Service.CreateAttestorRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -587,8 +635,11 @@ public final Resources.Attestor getAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -614,8 +665,11 @@ public final Resources.Attestor getAttestor(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetAttestorRequest request =
@@ -641,8 +695,11 @@ public final Resources.Attestor getAttestor(Service.GetAttestorRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.GetAttestorRequest request =
@@ -668,8 +725,11 @@ public final UnaryCallable getAt
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
@@ -697,8 +757,11 @@ public final Resources.Attestor updateAttestor(Resources.Attestor attestor) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdateAttestorRequest request =
@@ -724,8 +787,11 @@ public final Resources.Attestor updateAttestor(Service.UpdateAttestorRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.UpdateAttestorRequest request =
@@ -752,8 +818,11 @@ public final Resources.Attestor updateAttestor(Service.UpdateAttestorRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   ProjectName parent = ProjectName.of("[PROJECT]");
@@ -784,8 +853,11 @@ public final ListAttestorsPagedResponse listAttestors(ProjectName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String parent = ProjectName.of("[PROJECT]").toString();
@@ -814,8 +886,11 @@ public final ListAttestorsPagedResponse listAttestors(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -846,8 +921,11 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -878,8 +956,11 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.ListAttestorsRequest request =
@@ -917,8 +998,11 @@ public final ListAttestorsPagedResponse listAttestors(Service.ListAttestorsReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
@@ -946,8 +1030,11 @@ public final void deleteAttestor(AttestorName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
@@ -973,8 +1060,11 @@ public final void deleteAttestor(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.DeleteAttestorRequest request =
@@ -1000,8 +1090,11 @@ public final void deleteAttestor(Service.DeleteAttestorRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
    *     BinauthzManagementServiceV1Client.create()) {
    *   Service.DeleteAttestorRequest request =
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
index ec910fbe..8ac6eba0 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java
@@ -55,8 +55,11 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
  *     BinauthzManagementServiceV1Settings.newBuilder();
  * binauthzManagementServiceV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
index 44852203..68fd8cec 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java
@@ -32,8 +32,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
  *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
  *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -69,8 +72,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Settings systemPolicyV1Settings =
  *     SystemPolicyV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -81,8 +87,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Settings systemPolicyV1Settings =
  *     SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
@@ -92,8 +101,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Settings systemPolicyV1Settings =
  *     SystemPolicyV1Settings.newBuilder()
  *         .setTransportChannelProvider(
@@ -161,8 +173,11 @@ public SystemPolicyV1Stub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
    *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -188,8 +203,11 @@ public final Resources.Policy getSystemPolicy(PolicyName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
    *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -213,8 +231,11 @@ public final Resources.Policy getSystemPolicy(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   Service.GetSystemPolicyRequest request =
    *       Service.GetSystemPolicyRequest.newBuilder()
@@ -238,8 +259,11 @@ public final Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
    *   Service.GetSystemPolicyRequest request =
    *       Service.GetSystemPolicyRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
index 85a0e384..54bbcc7e 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java
@@ -51,17 +51,17 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
  *     SystemPolicyV1Settings.newBuilder();
  * systemPolicyV1SettingsBuilder
  *     .getSystemPolicySettings()
  *     .setRetrySettings(
- *         systemPolicyV1SettingsBuilder
- *             .getSystemPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
index 1e86f3ea..a1d35f21 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java
@@ -32,8 +32,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
  *   Service.ValidateAttestationOccurrenceRequest request =
  *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
@@ -77,8 +80,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ValidationHelperV1Settings validationHelperV1Settings =
  *     ValidationHelperV1Settings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -90,8 +96,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ValidationHelperV1Settings validationHelperV1Settings =
  *     ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
  * ValidationHelperV1Client validationHelperV1Client =
@@ -102,8 +111,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ValidationHelperV1Settings validationHelperV1Settings =
  *     ValidationHelperV1Settings.newBuilder()
  *         .setTransportChannelProvider(
@@ -172,8 +184,11 @@ public ValidationHelperV1Stub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
    *   Service.ValidateAttestationOccurrenceRequest request =
    *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
@@ -202,8 +217,11 @@ public final Service.ValidateAttestationOccurrenceResponse validateAttestationOc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
    *   Service.ValidateAttestationOccurrenceRequest request =
    *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
index 5c02ef7c..003984e8 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java
@@ -51,8 +51,11 @@
  * 

For example, to set the total timeout of validateAttestationOccurrence to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
  *     ValidationHelperV1Settings.newBuilder();
  * validationHelperV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
index 62b205e3..6faf14df 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java
@@ -34,8 +34,11 @@
  * 

Sample for BinauthzManagementServiceV1Client: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
  *     BinauthzManagementServiceV1Client.create()) {
  *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
@@ -50,8 +53,11 @@
  * 

Sample for SystemPolicyV1Client: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
  *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
  *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
@@ -65,8 +71,11 @@
  * 

Sample for ValidationHelperV1Client: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
  *   Service.ValidateAttestationOccurrenceRequest request =
  *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
index acf472b8..65cae21f 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java
@@ -74,8 +74,11 @@
  * 

For example, to set the total timeout of getPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
  *     BinauthzManagementServiceV1StubSettings.newBuilder();
  * binauthzManagementServiceV1SettingsBuilder
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java
index f94a985f..90721e87 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java
@@ -115,7 +115,8 @@ public class HttpJsonBinauthzManagementServiceV1Stub extends BinauthzManagementS
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("policy", request.getPolicy()))
+                              ProtoRestSerializer.create()
+                                  .toBody("policy", request.getPolicy(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -153,7 +154,7 @@ public class HttpJsonBinauthzManagementServiceV1Stub extends BinauthzManagementS
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attestor", request.getAttestor()))
+                                  .toBody("attestor", request.getAttestor(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -225,7 +226,7 @@ public class HttpJsonBinauthzManagementServiceV1Stub extends BinauthzManagementS
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attestor", request.getAttestor()))
+                                  .toBody("attestor", request.getAttestor(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java
index 4e13200b..8a83baa6 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java
@@ -83,7 +83,7 @@ public class HttpJsonValidationHelperV1Stub extends ValidationHelperV1Stub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttestor().build()))
+                                  .toBody("*", request.toBuilder().clearAttestor().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
index 7989f862..d01390bd 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java
@@ -63,17 +63,17 @@
  * 

For example, to set the total timeout of getSystemPolicy to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder =
  *     SystemPolicyV1StubSettings.newBuilder();
  * systemPolicyV1SettingsBuilder
  *     .getSystemPolicySettings()
  *     .setRetrySettings(
- *         systemPolicyV1SettingsBuilder
- *             .getSystemPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
index b73b6fb9..cbed6153 100644
--- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
+++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java
@@ -62,8 +62,11 @@
  * 

For example, to set the total timeout of validateAttestationOccurrence to 30 seconds: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder =
  *     ValidationHelperV1StubSettings.newBuilder();
  * validationHelperV1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java
index c133323f..3bcd4999 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
         BinauthzManagementServiceV1Beta1Settings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java
index 8d448f7a..26bcfb6a 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
         BinauthzManagementServiceV1Beta1Settings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java
index 6148caad..295c4ebc 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
         BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
     BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java
index fe2c587f..1ab1bc49 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       CreateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java
index 02c3d407..401f4858 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       CreateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java
index e912579e..b3a18757 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestorProjectnameStringAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java
index 7bb91110..4ef69a5b 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestorStringStringAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java
index 57e6a728..bf3bb616 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       DeleteAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java
index e98a4da2..c6c209f3 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       DeleteAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java
index 8797a77d..d66a2f89 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestorAttestorname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java
index e5cee1e2..2b59e103 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestorString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java
index 709b38ca..e297ddc9 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       GetAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java
index 55a763a7..4affd033 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       GetAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java
index c120c374..ce5409ec 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestorAttestorname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java
index b0a4417a..6c3721ab 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestorString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java
index bccfea74..f75844b9 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       GetPolicyRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java
index 8aad9831..8220c9ba 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       GetPolicyRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java
index 57c31c38..5705ab31 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicyPolicyname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       PolicyName name = PolicyName.ofProjectName("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java
index 9485d66d..c541bd4c 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicyString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       String name = PolicyName.ofProjectName("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java
index 84f78f98..392dc680 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListAttestors() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java
index 3539418f..a4f23ee1 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListAttestorsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java
index c3d0466d..cb6ce6fe 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestors() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java
index 4cce9cc4..7c640d20 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestorsProjectname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java
index 843f2e63..b379e5ee 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestorsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java
index 4386ed51..23b3a450 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       UpdateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java
index 7e98ef5d..8d96f843 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       UpdateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java
index ab2c58f3..e80285fa 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttestorAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       Attestor attestor = Attestor.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java
index 4a95a964..eb99854e 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdatePolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       UpdatePolicyRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java
index 36447e06..cafc3fc7 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdatePolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       UpdatePolicyRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java
index 6afce8dc..805719bd 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdatePolicyPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
         BinauthzManagementServiceV1Beta1Client.create()) {
       Policy policy = Policy.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java
index 5a0305e6..922fe028 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Beta1Settings.Builder
         binauthzManagementServiceV1Beta1SettingsBuilder =
             BinauthzManagementServiceV1Beta1Settings.newBuilder();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java
index 1d32c2b4..63550e47 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Beta1StubSettings.Builder
         binauthzManagementServiceV1Beta1SettingsBuilder =
             BinauthzManagementServiceV1Beta1StubSettings.newBuilder();
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
index 2135225b..c1ad723d 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
         SystemPolicyV1Beta1StubSettings.newBuilder();
     systemPolicyV1Beta1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java
index dda6b1b3..00f2fd48 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
         SystemPolicyV1Beta1Settings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java
index 7cbf949f..cb200f8b 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
         SystemPolicyV1Beta1Settings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java
index e4061a8d..7c7e7ab4 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
         SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
     SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java
index 6a38cc92..d2a196d3 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
       GetSystemPolicyRequest request =
           GetSystemPolicyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java
index 738cb1d2..9eed94b9 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
       GetSystemPolicyRequest request =
           GetSystemPolicyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
index d9f74fd5..1ee83432 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicyPolicyname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
       PolicyName name = PolicyName.ofLocationName("[LOCATION]");
       Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java
index 8732b004..a571ccfd 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicyString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
       String name = PolicyName.ofProjectName("[PROJECT]").toString();
       Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java
index b906e114..b33a2d8c 100644
--- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder =
         SystemPolicyV1Beta1Settings.newBuilder();
     systemPolicyV1Beta1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java
index 1765407d..4c8ea7aa 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
         BinauthzManagementServiceV1Settings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java
index 3c5264bb..1577b979 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
         BinauthzManagementServiceV1Settings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java
index e2b5d11f..420a93c7 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
         BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
     BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java
index 5029b0d7..f06ee7fb 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.CreateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java
index efbc973b..7fcbc689 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.CreateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java
index 6715ecc8..ccccccd6 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestorProjectnameStringResourcesattestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java
index 8b4ce8e0..fad591c5 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateAttestorStringStringResourcesattestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java
index e5e63a9b..cff4fd6b 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.DeleteAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java
index 2d3578b9..1f0a191b 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.DeleteAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java
index b93043cc..c0484c0c 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestorAttestorname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java
index ce17ef3f..747e929a 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteAttestorString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java
index cdf2a792..083788a7 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.GetAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java
index f3f8d332..272dda3a 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.GetAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java
index b27bef94..bf3c8364 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestorAttestorname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java
index 35d8b2c4..d205855e 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttestorString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java
index 6859b9c4..29fa43a6 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.GetPolicyRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java
index ed902a51..1b031f3c 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.GetPolicyRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java
index 09157171..6dc419b2 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicyPolicyname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       PolicyName name = PolicyName.ofProjectName("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java
index f4e2634e..4eb68650 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicyString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       String name = PolicyName.ofProjectName("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java
index 63686ef4..799ffae4 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListAttestors() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java
index c5969466..1e4027b3 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListAttestorsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java
index dd43c170..54b2f6e5 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestors() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.ListAttestorsRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java
index 15050638..a4358095 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestorsProjectname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       ProjectName parent = ProjectName.of("[PROJECT]");
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java
index 808f6f71..8d1d8f03 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListAttestorsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       String parent = ProjectName.of("[PROJECT]").toString();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java
index 3758acf9..cc7e5e3f 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.UpdateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java
index 6dbc7752..9f01816e 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.UpdateAttestorRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java
index 50a220e7..3e133dec 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttestorResourcesattestor() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java
index 4687b1a8..7197481f 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdatePolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.UpdatePolicyRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java
index c8d27d99..342f3b23 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdatePolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Service.UpdatePolicyRequest request =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java
index 9c3e1249..05d9eaef 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdatePolicyResourcespolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
         BinauthzManagementServiceV1Client.create()) {
       Resources.Policy policy = Resources.Policy.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java
index 2a67ee6d..7155ab0b 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
         BinauthzManagementServiceV1Settings.newBuilder();
     binauthzManagementServiceV1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java
index 5bce85cb..0c8f3f47 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
         BinauthzManagementServiceV1StubSettings.newBuilder();
     binauthzManagementServiceV1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
index 9145bf24..1f8cc38d 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder =
         SystemPolicyV1StubSettings.newBuilder();
     systemPolicyV1SettingsBuilder
         .getSystemPolicySettings()
         .setRetrySettings(
-            systemPolicyV1SettingsBuilder
-                .getSystemPolicySettings()
-                .getRetrySettings()
-                .toBuilder()
+            systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
index 39ade354..0ce560a2 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncValidateAttestationOccurrence() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder =
         ValidationHelperV1StubSettings.newBuilder();
     validationHelperV1SettingsBuilder
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java
index 7421d9e1..0a97b7f7 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Settings systemPolicyV1Settings =
         SystemPolicyV1Settings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java
index c89e1b96..b118275d 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Settings systemPolicyV1Settings =
         SystemPolicyV1Settings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java
index e27dedbb..75e502e6 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Settings systemPolicyV1Settings =
         SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
     SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java
index a8fa3b9a..04dfc7ca 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
       Service.GetSystemPolicyRequest request =
           Service.GetSystemPolicyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java
index e6c64fc5..05bed11c 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
       Service.GetSystemPolicyRequest request =
           Service.GetSystemPolicyRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
index 9332dafb..ed7f8a2f 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicyPolicyname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
       PolicyName name = PolicyName.ofLocationName("[LOCATION]");
       Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java
index 1f2ccc34..c1c65ba8 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicyString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
       String name = PolicyName.ofProjectName("[PROJECT]").toString();
       Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java
index dcbb731c..85a1adce 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetSystemPolicy() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
         SystemPolicyV1Settings.newBuilder();
     systemPolicyV1SettingsBuilder
         .getSystemPolicySettings()
         .setRetrySettings(
-            systemPolicyV1SettingsBuilder
-                .getSystemPolicySettings()
-                .getRetrySettings()
-                .toBuilder()
+            systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java
index 472d96cb..f15953ad 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ValidationHelperV1Settings validationHelperV1Settings =
         ValidationHelperV1Settings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java
index 20675342..01c63f5d 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ValidationHelperV1Settings validationHelperV1Settings =
         ValidationHelperV1Settings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java
index cb4e8914..c1407926 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ValidationHelperV1Settings validationHelperV1Settings =
         ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
     ValidationHelperV1Client validationHelperV1Client =
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java
index fd89b8ff..c49fdf50 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncValidateAttestationOccurrence() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
       Service.ValidateAttestationOccurrenceRequest request =
           Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
index f2c84458..c725427c 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncValidateAttestationOccurrence() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
       Service.ValidateAttestationOccurrenceRequest request =
           Service.ValidateAttestationOccurrenceRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
index da529e3d..6a926b07 100644
--- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
+++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncValidateAttestationOccurrence() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
         ValidationHelperV1Settings.newBuilder();
     validationHelperV1SettingsBuilder

From 64b3772a2b0a554d79b353177fd462b3edb77504 Mon Sep 17 00:00:00 2001
From: "release-please[bot]"
 <55107282+release-please[bot]@users.noreply.github.com>
Date: Fri, 9 Sep 2022 14:54:18 +0000
Subject: [PATCH 154/203] chore(main): release 1.2.5-SNAPSHOT (#260)

:robot: I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
---
 google-cloud-binary-authorization-bom/pom.xml        | 12 ++++++------
 google-cloud-binary-authorization/pom.xml            |  4 ++--
 grpc-google-cloud-binary-authorization-v1/pom.xml    |  4 ++--
 .../pom.xml                                          |  4 ++--
 pom.xml                                              | 12 ++++++------
 proto-google-cloud-binary-authorization-v1/pom.xml   |  4 ++--
 .../pom.xml                                          |  4 ++--
 versions.txt                                         | 10 +++++-----
 8 files changed, 27 insertions(+), 27 deletions(-)

diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml
index 01fea7eb..ca79a5dd 100644
--- a/google-cloud-binary-authorization-bom/pom.xml
+++ b/google-cloud-binary-authorization-bom/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   com.google.cloud
   google-cloud-binary-authorization-bom
-  1.2.4
+  1.2.5-SNAPSHOT
   pom
   
     com.google.cloud
@@ -56,27 +56,27 @@
       
         com.google.cloud
         google-cloud-binary-authorization
-        1.2.4
+        1.2.5-SNAPSHOT
       
       
         com.google.api.grpc
         grpc-google-cloud-binary-authorization-v1beta1
-        0.7.4
+        0.7.5-SNAPSHOT
       
       
         com.google.api.grpc
         grpc-google-cloud-binary-authorization-v1
-        1.2.4
+        1.2.5-SNAPSHOT
       
       
         com.google.api.grpc
         proto-google-cloud-binary-authorization-v1beta1
-        0.7.4
+        0.7.5-SNAPSHOT
       
       
         com.google.api.grpc
         proto-google-cloud-binary-authorization-v1
-        1.2.4
+        1.2.5-SNAPSHOT
       
     
   
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml
index 03cac83a..563ea08c 100644
--- a/google-cloud-binary-authorization/pom.xml
+++ b/google-cloud-binary-authorization/pom.xml
@@ -3,7 +3,7 @@
   4.0.0
   com.google.cloud
   google-cloud-binary-authorization
-  1.2.4
+  1.2.5-SNAPSHOT
   jar
   Google Binary Authorization
   https://github.com/googleapis/java-binary-authorization
@@ -11,7 +11,7 @@
   
     com.google.cloud
     google-cloud-binary-authorization-parent
-    1.2.4
+    1.2.5-SNAPSHOT
   
   
     google-cloud-binary-authorization
diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml
index 2bc5a46f..d6ebbccc 100644
--- a/grpc-google-cloud-binary-authorization-v1/pom.xml
+++ b/grpc-google-cloud-binary-authorization-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-binary-authorization-v1
-  1.2.4
+  1.2.5-SNAPSHOT
   grpc-google-cloud-binary-authorization-v1
   GRPC library for google-cloud-binary-authorization
   
     com.google.cloud
     google-cloud-binary-authorization-parent
-    1.2.4
+    1.2.5-SNAPSHOT
   
   
     
diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml
index f9d29dc8..4077c722 100644
--- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml
+++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-binary-authorization-v1beta1
-  0.7.4
+  0.7.5-SNAPSHOT
   grpc-google-cloud-binary-authorization-v1beta1
   GRPC library for google-cloud-binary-authorization
   
     com.google.cloud
     google-cloud-binary-authorization-parent
-    1.2.4
+    1.2.5-SNAPSHOT
   
   
     
diff --git a/pom.xml b/pom.xml
index 1e3897f8..eb5d777f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
   com.google.cloud
   google-cloud-binary-authorization-parent
   pom
-  1.2.4
+  1.2.5-SNAPSHOT
   Google Binary Authorization Parent
   https://github.com/googleapis/java-binary-authorization
   
@@ -60,27 +60,27 @@
       
         com.google.cloud
         google-cloud-binary-authorization
-        1.2.4
+        1.2.5-SNAPSHOT
       
       
         com.google.api.grpc
         proto-google-cloud-binary-authorization-v1
-        1.2.4
+        1.2.5-SNAPSHOT
       
       
         com.google.api.grpc
         grpc-google-cloud-binary-authorization-v1
-        1.2.4
+        1.2.5-SNAPSHOT
       
       
         com.google.api.grpc
         grpc-google-cloud-binary-authorization-v1beta1
-        0.7.4
+        0.7.5-SNAPSHOT
       
       
         com.google.api.grpc
         proto-google-cloud-binary-authorization-v1beta1
-        0.7.4
+        0.7.5-SNAPSHOT
       
 
       
diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml
index a2bb1cd1..3ee99e7f 100644
--- a/proto-google-cloud-binary-authorization-v1/pom.xml
+++ b/proto-google-cloud-binary-authorization-v1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   proto-google-cloud-binary-authorization-v1
-  1.2.4
+  1.2.5-SNAPSHOT
   proto-google-cloud-binary-authorization-v1
   Proto library for google-cloud-binary-authorization
   
     com.google.cloud
     google-cloud-binary-authorization-parent
-    1.2.4
+    1.2.5-SNAPSHOT
   
   
     
diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml
index 5f56952c..17f9651a 100644
--- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml
+++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   proto-google-cloud-binary-authorization-v1beta1
-  0.7.4
+  0.7.5-SNAPSHOT
   proto-google-cloud-binary-authorization-v1beta1
   Proto library for google-cloud-binary-authorization
   
     com.google.cloud
     google-cloud-binary-authorization-parent
-    1.2.4
+    1.2.5-SNAPSHOT
   
   
     
diff --git a/versions.txt b/versions.txt
index df0a08e2..94ae1556 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,8 +1,8 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-binary-authorization:1.2.4:1.2.4
-grpc-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.4
-grpc-google-cloud-binary-authorization-v1:1.2.4:1.2.4
-proto-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.4
-proto-google-cloud-binary-authorization-v1:1.2.4:1.2.4
+google-cloud-binary-authorization:1.2.4:1.2.5-SNAPSHOT
+grpc-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.5-SNAPSHOT
+grpc-google-cloud-binary-authorization-v1:1.2.4:1.2.5-SNAPSHOT
+proto-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.5-SNAPSHOT
+proto-google-cloud-binary-authorization-v1:1.2.4:1.2.5-SNAPSHOT

From 398de26209ee8d1caad5fc949a76f97a94dfd88a Mon Sep 17 00:00:00 2001
From: WhiteSource Renovate 
Date: Fri, 9 Sep 2022 17:08:57 +0200
Subject: [PATCH 155/203] deps: update dependency io.grafeas:grafeas to v2.4.4
 (#261)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [io.grafeas:grafeas](https://togithub.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/grafeas) ([source](https://togithub.com/googleapis/java-grafeas)) | `2.4.3` -> `2.4.4` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.4/compatibility-slim/2.4.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.4/confidence-slim/2.4.3)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

googleapis/java-grafeas ### [`v2.4.4`](https://togithub.com/googleapis/java-grafeas/blob/HEAD/CHANGELOG.md#​244-httpsgithubcomgoogleapisjava-grafeascomparev243v244-2022-09-09) [Compare Source](https://togithub.com/googleapis/java-grafeas/compare/v2.4.3...v2.4.4) ##### Dependencies - Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#​526](https://togithub.com/googleapis/java-grafeas/issues/526)) ([6836958](https://togithub.com/googleapis/java-grafeas/commit/6836958bf7752dc1ab2bdbb4c9d78392327074ea))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index eb5d777f..74ce933d 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.4.3 + 2.4.4 io.perfmark From fea8ab2874e46efc6aec5948a23c8eb71f6d0a17 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:18:21 +0000 Subject: [PATCH 156/203] chore: Generated snippets should not be owned by samples reviewers (#1575) (#264) Source-Link: https://github.com/googleapis/synthtool/commit/2e9ac19d5b8181af77cdc5337cf922517813cc49 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 --- .github/.OwlBot.lock.yaml | 3 +-- .github/CODEOWNERS | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 6610882f..62592923 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:04f254abfe5f47fe73ae6f91d68d55c3b76e722a4943066c3bb0ce03573b4ad9 -# created: 2022-07-18T21:44:23.94208526Z + digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 1578dc2f..5232f38f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -10,3 +10,6 @@ # The java-samples-reviewers team is the default owner for samples changes samples/**/*.java @googleapis/java-samples-reviewers + +# Generated snippets should not be owned by samples reviewers +samples/snippets/generated/ @googleapis/yoshi-java From 9faa993399cec96a792087afa6edecab95087f45 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:32:16 +0000 Subject: [PATCH 157/203] chore(main): release 1.2.5 (#262) :robot: I have created a release *beep* *boop* --- ## [1.2.5](https://github.com/googleapis/java-binary-authorization/compare/v1.2.4...v1.2.5) (2022-09-10) ### Dependencies * Update dependency io.grafeas:grafeas to v2.4.4 ([#261](https://github.com/googleapis/java-binary-authorization/issues/261)) ([398de26](https://github.com/googleapis/java-binary-authorization/commit/398de26209ee8d1caad5fc949a76f97a94dfd88a)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 46695325..dd8f6f67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.5](https://github.com/googleapis/java-binary-authorization/compare/v1.2.4...v1.2.5) (2022-09-10) + + +### Dependencies + +* Update dependency io.grafeas:grafeas to v2.4.4 ([#261](https://github.com/googleapis/java-binary-authorization/issues/261)) ([398de26](https://github.com/googleapis/java-binary-authorization/commit/398de26209ee8d1caad5fc949a76f97a94dfd88a)) + ## [1.2.4](https://github.com/googleapis/java-binary-authorization/compare/v1.2.3...v1.2.4) (2022-09-09) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index ca79a5dd..039afd3c 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.5-SNAPSHOT + 1.2.5 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.5-SNAPSHOT + 1.2.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index 563ea08c..cfc719db 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.5-SNAPSHOT + 1.2.5 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.5-SNAPSHOT + 1.2.5 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index d6ebbccc..d3df105d 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5-SNAPSHOT + 1.2.5 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 4077c722..b8bff06a 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5-SNAPSHOT + 1.2.5 diff --git a/pom.xml b/pom.xml index 74ce933d..7dfdfd80 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.5-SNAPSHOT + 1.2.5 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.5-SNAPSHOT + 1.2.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 3ee99e7f..bbc8f9e0 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5-SNAPSHOT + 1.2.5 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5-SNAPSHOT + 1.2.5 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 17f9651a..c23cb457 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5-SNAPSHOT + 0.7.5 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5-SNAPSHOT + 1.2.5 diff --git a/versions.txt b/versions.txt index 94ae1556..1a4ca471 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.4:1.2.5-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.5-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.4:1.2.5-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.4:0.7.5-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.4:1.2.5-SNAPSHOT +google-cloud-binary-authorization:1.2.5:1.2.5 +grpc-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.5 +grpc-google-cloud-binary-authorization-v1:1.2.5:1.2.5 +proto-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.5 +proto-google-cloud-binary-authorization-v1:1.2.5:1.2.5 From e0a9f5baf7ac59c1ce195a175557dbfa39b163dd Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Sat, 10 Sep 2022 02:46:17 +0000 Subject: [PATCH 158/203] chore(main): release 1.2.6-SNAPSHOT (#265) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 039afd3c..6b222d97 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.5 + 1.2.6-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.5 + 1.2.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index cfc719db..cb4ab05b 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.5 + 1.2.6-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.5 + 1.2.6-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index d3df105d..185f66b6 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index b8bff06a..09b91a1d 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/pom.xml b/pom.xml index 7dfdfd80..0819f29f 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.5 + 1.2.6-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.5 + 1.2.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index bbc8f9e0..ca7be761 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.5 + 1.2.6-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index c23cb457..3472206c 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.5 + 0.7.6-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.5 + 1.2.6-SNAPSHOT diff --git a/versions.txt b/versions.txt index 1a4ca471..cab96318 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.5:1.2.5 -grpc-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.5 -grpc-google-cloud-binary-authorization-v1:1.2.5:1.2.5 -proto-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.5 -proto-google-cloud-binary-authorization-v1:1.2.5:1.2.5 +google-cloud-binary-authorization:1.2.5:1.2.6-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.6-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.5:1.2.6-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.6-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.5:1.2.6-SNAPSHOT From 0ab77337543942c8bdd5e9ae554790ca826931a8 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 15 Sep 2022 14:18:21 +0200 Subject: [PATCH 159/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 (#266) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.2` -> `3.0.3` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/compatibility-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.3/confidence-slim/3.0.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 90425249..7f3a8337 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.3 + 1.2.5 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.3' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.5' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.3" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.5" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 0819f29f..3d8f420a 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.0.2 + 3.0.3 pom import From c834233b88acbb800ad55dd90546f0c66c836553 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 12:46:22 +0000 Subject: [PATCH 160/203] chore(main): release 1.2.6 (#267) :robot: I have created a release *beep* *boop* --- ## [1.2.6](https://github.com/googleapis/java-binary-authorization/compare/v1.2.5...v1.2.6) (2022-09-15) ### Dependencies * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#266](https://github.com/googleapis/java-binary-authorization/issues/266)) ([0ab7733](https://github.com/googleapis/java-binary-authorization/commit/0ab77337543942c8bdd5e9ae554790ca826931a8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd8f6f67..c2219ac7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.6](https://github.com/googleapis/java-binary-authorization/compare/v1.2.5...v1.2.6) (2022-09-15) + + +### Dependencies + +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#266](https://github.com/googleapis/java-binary-authorization/issues/266)) ([0ab7733](https://github.com/googleapis/java-binary-authorization/commit/0ab77337543942c8bdd5e9ae554790ca826931a8)) + ## [1.2.5](https://github.com/googleapis/java-binary-authorization/compare/v1.2.4...v1.2.5) (2022-09-10) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 6b222d97..8fe4a3cd 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.6-SNAPSHOT + 1.2.6 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.6-SNAPSHOT + 1.2.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index cb4ab05b..d055f6a5 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.6-SNAPSHOT + 1.2.6 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.6-SNAPSHOT + 1.2.6 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 185f66b6..80f1bb6c 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6-SNAPSHOT + 1.2.6 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 09b91a1d..5fe3de7d 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6-SNAPSHOT + 1.2.6 diff --git a/pom.xml b/pom.xml index 3d8f420a..3c9c6243 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.6-SNAPSHOT + 1.2.6 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.6-SNAPSHOT + 1.2.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index ca7be761..1a2cd293 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6-SNAPSHOT + 1.2.6 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6-SNAPSHOT + 1.2.6 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 3472206c..2d117e36 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6-SNAPSHOT + 0.7.6 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6-SNAPSHOT + 1.2.6 diff --git a/versions.txt b/versions.txt index cab96318..eb48dac1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.5:1.2.6-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.6-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.5:1.2.6-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.5:0.7.6-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.5:1.2.6-SNAPSHOT +google-cloud-binary-authorization:1.2.6:1.2.6 +grpc-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.6 +grpc-google-cloud-binary-authorization-v1:1.2.6:1.2.6 +proto-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.6 +proto-google-cloud-binary-authorization-v1:1.2.6:1.2.6 From 8fab9ba15c27dbb4dce7da83d9064e2973498e00 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:00:29 +0000 Subject: [PATCH 161/203] chore(main): release 1.2.7-SNAPSHOT (#268) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 8fe4a3cd..3645cbb3 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.6 + 1.2.7-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.6 + 1.2.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index d055f6a5..aec05515 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.6 + 1.2.7-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.6 + 1.2.7-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 80f1bb6c..50861cff 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6 + 1.2.7-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 5fe3de7d..e1eb325d 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6 + 1.2.7-SNAPSHOT diff --git a/pom.xml b/pom.xml index 3c9c6243..923d1a7b 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.6 + 1.2.7-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.6 + 1.2.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 1a2cd293..9c95aea6 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.6 + 1.2.7-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6 + 1.2.7-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 2d117e36..d2f49b14 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.6 + 0.7.7-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.6 + 1.2.7-SNAPSHOT diff --git a/versions.txt b/versions.txt index eb48dac1..4cb9ffc7 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.6:1.2.6 -grpc-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.6 -grpc-google-cloud-binary-authorization-v1:1.2.6:1.2.6 -proto-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.6 -proto-google-cloud-binary-authorization-v1:1.2.6:1.2.6 +google-cloud-binary-authorization:1.2.6:1.2.7-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.7-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.6:1.2.7-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.7-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.6:1.2.7-SNAPSHOT From 8a9a66dcc9fd417fcaaa3d06c432a6e4a2f50347 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Tue, 20 Sep 2022 16:16:17 +0200 Subject: [PATCH 162/203] deps: update dependency io.grafeas:grafeas to v2.4.5 (#269) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/grafeas) ([source](https://togithub.com/googleapis/java-grafeas)) | `2.4.4` -> `2.4.5` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.5/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.5/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.5/compatibility-slim/2.4.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.5/confidence-slim/2.4.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7f3a8337..e4fe99fa 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.5 + 1.2.6 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.5' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.6' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.5" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.6" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 923d1a7b..9c00e033 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.4.4 + 2.4.5 io.perfmark From a48aa0f6d43a11536300fff0d545c8abb9c21630 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 14:44:15 +0000 Subject: [PATCH 163/203] chore(main): release 1.2.7 (#270) :robot: I have created a release *beep* *boop* --- ## [1.2.7](https://github.com/googleapis/java-binary-authorization/compare/v1.2.6...v1.2.7) (2022-09-20) ### Dependencies * Update dependency io.grafeas:grafeas to v2.4.5 ([#269](https://github.com/googleapis/java-binary-authorization/issues/269)) ([8a9a66d](https://github.com/googleapis/java-binary-authorization/commit/8a9a66dcc9fd417fcaaa3d06c432a6e4a2f50347)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- CHANGELOG.md | 7 +++++++ google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 9 files changed, 34 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2219ac7..3ad20168 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.2.7](https://github.com/googleapis/java-binary-authorization/compare/v1.2.6...v1.2.7) (2022-09-20) + + +### Dependencies + +* Update dependency io.grafeas:grafeas to v2.4.5 ([#269](https://github.com/googleapis/java-binary-authorization/issues/269)) ([8a9a66d](https://github.com/googleapis/java-binary-authorization/commit/8a9a66dcc9fd417fcaaa3d06c432a6e4a2f50347)) + ## [1.2.6](https://github.com/googleapis/java-binary-authorization/compare/v1.2.5...v1.2.6) (2022-09-15) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 3645cbb3..fda105c2 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.7-SNAPSHOT + 1.2.7 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.7-SNAPSHOT + 1.2.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index aec05515..e0501e1b 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.7-SNAPSHOT + 1.2.7 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.7-SNAPSHOT + 1.2.7 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 50861cff..9ac18360 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7-SNAPSHOT + 1.2.7 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index e1eb325d..024a07ac 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7-SNAPSHOT + 1.2.7 diff --git a/pom.xml b/pom.xml index 9c00e033..a1486672 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.7-SNAPSHOT + 1.2.7 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.7-SNAPSHOT + 1.2.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 9c95aea6..d88f50ac 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7-SNAPSHOT + 1.2.7 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7-SNAPSHOT + 1.2.7 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index d2f49b14..07fc3da5 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7-SNAPSHOT + 0.7.7 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7-SNAPSHOT + 1.2.7 diff --git a/versions.txt b/versions.txt index 4cb9ffc7..1a3dc6d6 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.6:1.2.7-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.7-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.6:1.2.7-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.6:0.7.7-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.6:1.2.7-SNAPSHOT +google-cloud-binary-authorization:1.2.7:1.2.7 +grpc-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.7 +grpc-google-cloud-binary-authorization-v1:1.2.7:1.2.7 +proto-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.7 +proto-google-cloud-binary-authorization-v1:1.2.7:1.2.7 From d6a89c1f37a6ae476acf5e540caa977fa96ed27d Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 15:02:32 +0000 Subject: [PATCH 164/203] chore(main): release 1.2.8-SNAPSHOT (#271) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index fda105c2..2a6eda39 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.7 + 1.2.8-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.7 + 1.2.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index e0501e1b..f17d3bc6 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.7 + 1.2.8-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.7 + 1.2.8-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 9ac18360..2cc05b72 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7 + 1.2.8-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 024a07ac..2cc53037 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7 + 1.2.8-SNAPSHOT diff --git a/pom.xml b/pom.xml index a1486672..f4fb0f36 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.7 + 1.2.8-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.7 + 1.2.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index d88f50ac..1bb8a2fa 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.7 + 1.2.8-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7 + 1.2.8-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 07fc3da5..5d9fe5a9 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.7 + 0.7.8-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.7 + 1.2.8-SNAPSHOT diff --git a/versions.txt b/versions.txt index 1a3dc6d6..7817fc90 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.7:1.2.7 -grpc-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.7 -grpc-google-cloud-binary-authorization-v1:1.2.7:1.2.7 -proto-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.7 -proto-google-cloud-binary-authorization-v1:1.2.7:1.2.7 +google-cloud-binary-authorization:1.2.7:1.2.8-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.8-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.7:1.2.8-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.8-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.7:1.2.8-SNAPSHOT From 7f02bc2a03941982be94d2c423f5dbb9a1405bf5 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 26 Sep 2022 21:50:12 +0000 Subject: [PATCH 165/203] chore: exclude requirements.txt file from renovate-bot (#1594) (#275) Source-Link: https://github.com/googleapis/synthtool/commit/f58d3135a2fab20e225d98741dbc06d57459b816 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 --- .github/.OwlBot.lock.yaml | 2 +- .kokoro/release/publish_javadoc.sh | 2 +- .kokoro/release/publish_javadoc11.sh | 2 +- .kokoro/release/stage.sh | 3 +- .kokoro/requirements.in | 31 ++ .kokoro/requirements.txt | 452 +++++++++++++++++++++++++++ README.md | 6 +- renovate.json | 1 + 8 files changed, 492 insertions(+), 7 deletions(-) create mode 100644 .kokoro/requirements.in create mode 100644 .kokoro/requirements.txt diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 62592923..42327db5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 + digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 1c3669e8..b6e23166 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 23c7117b..ed0d06a3 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 1dba8de1..61e714d6 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,7 +16,8 @@ set -eo pipefail # Start the releasetool reporter -python3 -m pip install gcp-releasetool +requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) +python3 -m pip install --require-hashes -r $requirementsFile python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in new file mode 100644 index 00000000..cfdc2e7e --- /dev/null +++ b/.kokoro/requirements.in @@ -0,0 +1,31 @@ +gcp-docuploader==0.6.3 +google-crc32c==1.3.0 +googleapis-common-protos==1.56.3 +gcp-releasetool==1.8.7 +cachetools==4.2.4 +cffi==1.15.1 +jeepney==0.7.1 +jinja2==3.0.3 +markupsafe==2.0.1 +keyring==23.4.1 +packaging==21.3 +protobuf==3.19.5 +pyjwt==2.4.0 +pyparsing==3.0.9 +pycparser==2.21 +pyperclip==1.8.2 +python-dateutil==2.8.2 +requests==2.27.1 +importlib-metadata==4.8.3 +zipp==3.6.0 +google_api_core==2.8.2 +google-cloud-storage==2.0.0 +google-cloud-core==2.3.1 +typing-extensions==4.1.1 +urllib3==1.26.12 +zipp==3.6.0 +rsa==4.9 +six==1.16.0 +attrs==22.1.0 +google-auth==2.11.0 +idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt new file mode 100644 index 00000000..170f1c63 --- /dev/null +++ b/.kokoro/requirements.txt @@ -0,0 +1,452 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile --allow-unsafe --generate-hashes requirements.in +# +attrs==22.1.0 \ + --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ + --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c + # via + # -r requirements.in + # gcp-releasetool +cachetools==4.2.4 \ + --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ + --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 + # via + # -r requirements.in + # google-auth +certifi==2022.9.14 \ + --hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \ + --hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516 + # via requests +cffi==1.15.1 \ + --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ + --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ + --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ + --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ + --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ + --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ + --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ + --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ + --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ + --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ + --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ + --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ + --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ + --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ + --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ + --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ + --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ + --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ + --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ + --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ + --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ + --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ + --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ + --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ + --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ + --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ + --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ + --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ + --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ + --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ + --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ + --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ + --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ + --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ + --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ + --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ + --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ + --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ + --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ + --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ + --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ + --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ + --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ + --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ + --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ + --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ + --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ + --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ + --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ + --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ + --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ + --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ + --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ + --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ + --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ + --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ + --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ + --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ + --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ + --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ + --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ + --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ + --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ + --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 + # via + # -r requirements.in + # cryptography +charset-normalizer==2.0.12 \ + --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ + --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df + # via requests +click==8.0.4 \ + --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ + --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb + # via + # gcp-docuploader + # gcp-releasetool +colorlog==6.7.0 \ + --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ + --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 + # via gcp-docuploader +cryptography==38.0.1 \ + --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ + --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ + --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ + --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ + --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ + --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ + --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ + --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ + --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ + --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ + --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ + --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ + --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ + --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ + --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ + --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ + --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ + --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ + --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ + --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ + --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ + --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ + --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ + --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ + --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ + --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 + # via + # gcp-releasetool + # secretstorage +gcp-docuploader==0.6.3 \ + --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ + --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b + # via -r requirements.in +gcp-releasetool==1.8.7 \ + --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ + --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d + # via -r requirements.in +google-api-core==2.8.2 \ + --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ + --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 + # via + # -r requirements.in + # google-cloud-core + # google-cloud-storage +google-auth==2.11.0 \ + --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ + --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-core + # google-cloud-storage +google-cloud-core==2.3.1 \ + --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ + --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 + # via + # -r requirements.in + # google-cloud-storage +google-cloud-storage==2.0.0 \ + --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ + --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 + # via + # -r requirements.in + # gcp-docuploader +google-crc32c==1.3.0 \ + --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ + --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ + --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ + --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ + --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ + --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ + --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ + --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ + --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ + --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ + --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ + --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ + --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ + --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ + --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ + --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ + --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ + --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ + --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ + --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ + --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ + --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ + --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ + --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ + --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ + --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ + --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ + --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ + --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ + --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ + --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ + --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ + --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ + --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ + --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ + --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ + --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ + --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ + --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ + --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ + --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ + --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ + --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 + # via + # -r requirements.in + # google-resumable-media +google-resumable-media==2.3.3 \ + --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ + --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 + # via google-cloud-storage +googleapis-common-protos==1.56.3 \ + --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ + --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 + # via + # -r requirements.in + # google-api-core +idna==3.4 \ + --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ + --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 + # via + # -r requirements.in + # requests +importlib-metadata==4.8.3 \ + --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ + --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 + # via + # -r requirements.in + # keyring +jeepney==0.7.1 \ + --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ + --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f + # via + # -r requirements.in + # keyring + # secretstorage +jinja2==3.0.3 \ + --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ + --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 + # via + # -r requirements.in + # gcp-releasetool +keyring==23.4.1 \ + --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ + --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 + # via + # -r requirements.in + # gcp-releasetool +markupsafe==2.0.1 \ + --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ + --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ + --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ + --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ + --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ + --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ + --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ + --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ + --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ + --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ + --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ + --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ + --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ + --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ + --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ + --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ + --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ + --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ + --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ + --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ + --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ + --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ + --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ + --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ + --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ + --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ + --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ + --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ + --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ + --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ + --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ + --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ + --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ + --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ + --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ + --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ + --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ + --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ + --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ + --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ + --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ + --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ + --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ + --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ + --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ + --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ + --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ + --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ + --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ + --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ + --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ + --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ + --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ + --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ + --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ + --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ + --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ + --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ + --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ + --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ + --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ + --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ + --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ + --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ + --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ + --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ + --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ + --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ + --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 + # via + # -r requirements.in + # jinja2 +packaging==21.3 \ + --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ + --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 + # via + # -r requirements.in + # gcp-releasetool +protobuf==3.19.5 \ + --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ + --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ + --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ + --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ + --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ + --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ + --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ + --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ + --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ + --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ + --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ + --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ + --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ + --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ + --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ + --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ + --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ + --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ + --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ + --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ + --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ + --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ + --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ + --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ + --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ + --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de + # via + # -r requirements.in + # gcp-docuploader + # gcp-releasetool + # google-api-core + # google-cloud-storage + # googleapis-common-protos +pyasn1==0.4.8 \ + --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ + --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.2.8 \ + --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ + --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 + # via google-auth +pycparser==2.21 \ + --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ + --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 + # via + # -r requirements.in + # cffi +pyjwt==2.4.0 \ + --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ + --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba + # via + # -r requirements.in + # gcp-releasetool +pyparsing==3.0.9 \ + --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ + --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc + # via + # -r requirements.in + # packaging +pyperclip==1.8.2 \ + --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 + # via + # -r requirements.in + # gcp-releasetool +python-dateutil==2.8.2 \ + --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ + --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 + # via + # -r requirements.in + # gcp-releasetool +requests==2.27.1 \ + --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ + --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-storage +rsa==4.9 \ + --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ + --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 + # via + # -r requirements.in + # google-auth +secretstorage==3.3.3 \ + --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ + --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 + # via keyring +six==1.16.0 \ + --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ + --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 + # via + # -r requirements.in + # gcp-docuploader + # google-auth + # python-dateutil +typing-extensions==4.1.1 \ + --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ + --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 + # via -r requirements.in +urllib3==1.26.12 \ + --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ + --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 + # via + # -r requirements.in + # requests +zipp==3.6.0 \ + --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ + --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc + # via + # -r requirements.in + # importlib-metadata diff --git a/README.md b/README.md index e4fe99fa..003df9bb 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.6 + 1.2.7 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.6' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.7' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.6" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.7" ``` ## Authentication diff --git a/renovate.json b/renovate.json index 8a97e7d3..424b539a 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From c91d17d47d07de80c8cc4e013aa58aae0ec7d263 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 01:44:26 +0000 Subject: [PATCH 166/203] chore: pin versions of dependencies for compatibility with Python 3.6 (#1588) (#274) * chore: pin versions of dependencies for compatibility with Python 3.6 * fix path of requirements file in synthtool Source-Link: https://github.com/googleapis/synthtool/commit/69cdb47824170d0b02bf694649ce66613c889040 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 --- .github/.OwlBot.lock.yaml | 3 ++- renovate.json | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 42327db5..0a5cae5a 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 + digest: sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 + diff --git a/renovate.json b/renovate.json index 424b539a..8a97e7d3 100644 --- a/renovate.json +++ b/renovate.json @@ -10,7 +10,6 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], - "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From bc3ba5f176dec003fe555becd1bce6e2cc415c29 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:34:19 +0200 Subject: [PATCH 167/203] deps: update dependency protobuf to v4 (#297) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [protobuf](https://developers.google.com/protocol-buffers/) | `==3.19.5` -> `==4.21.6` | [![age](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.6/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.6/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.6/compatibility-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/protobuf/4.21.6/confidence-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 06784edc130cb1c12ba332c015cc3bc91bb94449 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:36:28 +0200 Subject: [PATCH 168/203] deps: update dependency click to v8.1.3 (#281) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [click](https://palletsprojects.com/p/click/) ([changelog](https://click.palletsprojects.com/changes/)) | `==8.0.4` -> `==8.1.3` | [![age](https://badges.renovateapi.com/packages/pypi/click/8.1.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/click/8.1.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/click/8.1.3/compatibility-slim/8.0.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/click/8.1.3/confidence-slim/8.0.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 5716f177c2f26190ec9ca6c6ccd0a321a75b553d Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:38:24 +0200 Subject: [PATCH 169/203] deps: update dependency pyjwt to v2.5.0 (#292) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [pyjwt](https://togithub.com/jpadilla/pyjwt) | `==2.4.0` -> `==2.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/compatibility-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/pyjwt/2.5.0/confidence-slim/2.4.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 7078803a0cde79de542d292574aac2677835bae2 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:38:29 +0200 Subject: [PATCH 170/203] deps: update dependency keyring to v23.9.3 (#289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [keyring](https://togithub.com/jaraco/keyring) | `==23.4.1` -> `==23.9.3` | [![age](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/compatibility-slim/23.4.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/keyring/23.9.3/confidence-slim/23.4.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 11256f60434380193875a9de6a36175bb387963c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:40:14 +0200 Subject: [PATCH 171/203] deps: update dependency google-crc32c to v1.5.0 (#285) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-crc32c](https://togithub.com/googleapis/python-crc32c) | `==1.3.0` -> `==1.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/compatibility-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-crc32c/1.5.0/confidence-slim/1.3.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 92126233c88c5d993c9d1b1402f103c65c3cb2bd Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:40:19 +0200 Subject: [PATCH 172/203] deps: update dependency requests to v2.28.1 (#293) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [requests](https://requests.readthedocs.io) ([source](https://togithub.com/psf/requests), [changelog](https://togithub.com/psf/requests/blob/master/HISTORY.md)) | `==2.27.1` -> `==2.28.1` | [![age](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/compatibility-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/requests/2.28.1/confidence-slim/2.27.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 7798d5b247e4ce33234c3b021cd6f90bae0dab90 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:44:20 +0200 Subject: [PATCH 173/203] deps: update dependency google-cloud-core to v2.3.2 (#278) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-core](https://togithub.com/googleapis/python-cloud-core) | `==2.3.1` -> `==2.3.2` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/compatibility-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-core/2.3.2/confidence-slim/2.3.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 99775f2926da14724916464a2eb284fb188e17cf Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:46:13 +0200 Subject: [PATCH 174/203] deps: update dependency cachetools to v5 (#296) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [cachetools](https://togithub.com/tkem/cachetools) | `==4.2.4` -> `==5.2.0` | [![age](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/compatibility-slim/4.2.4)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/cachetools/5.2.0/confidence-slim/4.2.4)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From f51db100aa1becd3b3860dba462add09887f3dbb Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:46:22 +0200 Subject: [PATCH 175/203] deps: update dependency importlib-metadata to v4.12.0 (#286) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [importlib-metadata](https://togithub.com/python/importlib_metadata) | `==4.8.3` -> `==4.12.0` | [![age](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/compatibility-slim/4.8.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/importlib-metadata/4.12.0/confidence-slim/4.8.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 9644c7f679a786aaea6686eaf219142003f1ea11 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:48:31 +0200 Subject: [PATCH 176/203] deps: update dependency protobuf to v3.20.2 (#291) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [protobuf](https://developers.google.com/protocol-buffers/) | `==3.19.5` -> `==3.20.2` | [![age](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/compatibility-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.2/confidence-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 9db78e36ff0ec71f55c3a461d67ec88dc7438e2c Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:50:18 +0200 Subject: [PATCH 177/203] deps: update dependency google-cloud-storage to v2.5.0 (#284) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-cloud-storage](https://togithub.com/googleapis/python-storage) | `==2.0.0` -> `==2.5.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/compatibility-slim/2.0.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-cloud-storage/2.5.0/confidence-slim/2.0.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 9709b14bcabc8ef5283c9d902bfa54fb92f7bbf1 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:50:37 +0200 Subject: [PATCH 178/203] deps: update dependency googleapis-common-protos to v1.56.4 (#279) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [googleapis-common-protos](https://togithub.com/googleapis/python-api-common-protos) | `==1.56.3` -> `==1.56.4` | [![age](https://badges.renovateapi.com/packages/pypi/googleapis-common-protos/1.56.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/googleapis-common-protos/1.56.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/googleapis-common-protos/1.56.4/compatibility-slim/1.56.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/googleapis-common-protos/1.56.4/confidence-slim/1.56.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From b951c37239b55920bfd89dedb96af7b1397a4caa Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:52:34 +0200 Subject: [PATCH 179/203] deps: update dependency jeepney to v0.8.0 (#287) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jeepney](https://gitlab.com/takluyver/jeepney) | `==0.7.1` -> `==0.8.0` | [![age](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/compatibility-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/jeepney/0.8.0/confidence-slim/0.7.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 628c44f5cd15373234fc9e74a24508b8c754bd38 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 16:58:23 +0200 Subject: [PATCH 180/203] deps: update dependency gcp-releasetool to v1.8.8 (#277) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | gcp-releasetool | `==1.8.7` -> `==1.8.8` | [![age](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/compatibility-slim/1.8.7)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/gcp-releasetool/1.8.8/confidence-slim/1.8.7)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 89915070e073b8b190871f9277b14aa9a83aff1a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:00:29 +0200 Subject: [PATCH 181/203] deps: update dependency google-api-core to v2.10.1 (#282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-api-core](https://togithub.com/googleapis/python-api-core) | `==2.8.2` -> `==2.10.1` | [![age](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/compatibility-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-api-core/2.10.1/confidence-slim/2.8.2)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 2e3f88acbb06f8a85486c33b260d75477f41a200 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:02:18 +0200 Subject: [PATCH 182/203] deps: update dependency charset-normalizer to v2.1.1 (#280) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [charset-normalizer](https://togithub.com/ousret/charset_normalizer) | `==2.0.12` -> `==2.1.1` | [![age](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/compatibility-slim/2.0.12)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/charset-normalizer/2.1.1/confidence-slim/2.0.12)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 1640a694e1a93626b84746ffd3064abdd2a13e03 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:02:33 +0200 Subject: [PATCH 183/203] deps: update dependency certifi to v2022.9.24 (#276) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [certifi](https://togithub.com/certifi/python-certifi) | `==2022.9.14` -> `==2022.9.24` | [![age](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/compatibility-slim/2022.9.14)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/certifi/2022.9.24/confidence-slim/2022.9.14)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 43a78ce22a83ec39cdeca08d73be79bfd00c28fc Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:08:18 +0200 Subject: [PATCH 184/203] deps: update dependency zipp to v3.8.1 (#295) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [zipp](https://togithub.com/jaraco/zipp) | `==3.6.0` -> `==3.8.1` | [![age](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/compatibility-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/zipp/3.8.1/confidence-slim/3.6.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 21a18c3bdf9c3d8cb7b9373fb90bc877c7bc460b Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:08:22 +0200 Subject: [PATCH 185/203] deps: update dependency google-auth to v2.12.0 (#283) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-auth](https://togithub.com/googleapis/google-auth-library-python) | `==2.11.0` -> `==2.12.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/compatibility-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-auth/2.12.0/confidence-slim/2.11.0)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 5469e46df1ac140ca4d308eeb43bfb41d341a72a Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:10:38 +0200 Subject: [PATCH 186/203] deps: update dependency markupsafe to v2.1.1 (#290) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [markupsafe](https://palletsprojects.com/p/markupsafe/) ([changelog](https://markupsafe.palletsprojects.com/changes/)) | `==2.0.1` -> `==2.1.1` | [![age](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/compatibility-slim/2.0.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/markupsafe/2.1.1/confidence-slim/2.0.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From ffd2347ba6a157110d0c4925df8979840ffc7197 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Wed, 28 Sep 2022 17:26:15 +0200 Subject: [PATCH 187/203] deps: update dependency jinja2 to v3.1.2 (#288) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [jinja2](https://palletsprojects.com/p/jinja/) ([changelog](https://jinja.palletsprojects.com/changes/)) | `==3.0.3` -> `==3.1.2` | [![age](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/jinja2/3.1.2/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 20c56f386d5516848c662473a377af35b8eb4930 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 19:55:18 -0400 Subject: [PATCH 188/203] docs: [owlbot-java] samples do not need deploy plugin and deps upgrade (#1583) (#273) * docs: samples do not need deploy plugin * deps: upgrading shared deps 3.0.3 * fixing golden test Source-Link: https://github.com/googleapis/synthtool/commit/b61387e715529d29c3fed889477081873524f4dc Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:23f5a406dfc9a62e61c4fb11e343f7f9f21af15b5b1f23d0535a10294ee337fd Co-authored-by: Owl Bot Co-authored-by: Diego Alonso Marquez Palacios --- .github/.OwlBot.lock.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 0a5cae5a..791e842d 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -14,4 +14,3 @@ docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest digest: sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 - From 496eed218c7fa57b1007e9f4c3977ea04d2f2bde Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 29 Sep 2022 16:32:38 +0200 Subject: [PATCH 189/203] deps: update dependency typing-extensions to v4.3.0 (#294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [typing-extensions](https://togithub.com/python/typing_extensions) ([changelog](https://togithub.com/python/typing_extensions/blob/main/CHANGELOG.md)) | `==4.1.1` -> `==4.3.0` | [![age](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/compatibility-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/typing-extensions/4.3.0/confidence-slim/4.1.1)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From 12ddbb97f55f9fbec37b40caa20c0ece53d1d177 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 16:42:18 +0200 Subject: [PATCH 190/203] deps: update dependency google-resumable-media to v2.4.0 (#299) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [google-resumable-media](https://togithub.com/googleapis/google-resumable-media-python) | `==2.3.3` -> `==2.4.0` | [![age](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/compatibility-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/google-resumable-media/2.4.0/confidence-slim/2.3.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From a5b20f7364ccf3e4c91bd86efd55c4e5b6eb15c7 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Fri, 30 Sep 2022 17:42:21 +0200 Subject: [PATCH 191/203] deps: update dependency protobuf to v3.20.3 (#300) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [protobuf](https://developers.google.com/protocol-buffers/) | `==3.19.5` -> `==3.20.3` | [![age](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.3/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.3/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.3/compatibility-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/pypi/protobuf/3.20.3/confidence-slim/3.19.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). From c8a3ffef196df5bc79ed6ee0fcb93f1497da409f Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 30 Sep 2022 14:02:46 -0400 Subject: [PATCH 192/203] chore: [java] stopping auto release (#1596) (#301) Source-Link: https://github.com/googleapis/synthtool/commit/316ebf5531c4eed734fd325a9631d3249b3d486e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:086f6916c24f11a1a196ea47f9da39abb4ca8730fcd6e69158fec4834287bcde Co-authored-by: Owl Bot --- .github/.OwlBot.lock.yaml | 2 +- renovate.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 791e842d..dfd85d72 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:6566dc8226f20993af18e5a4e7a2b1ba85a292b02dedb6a1634cf10e1b418fa5 + digest: sha256:086f6916c24f11a1a196ea47f9da39abb4ca8730fcd6e69158fec4834287bcde diff --git a/renovate.json b/renovate.json index 8a97e7d3..424b539a 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ From 30f22c2a2eee01a07c49b6c4063c0b0fb51d8c76 Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Mon, 3 Oct 2022 15:48:22 +0200 Subject: [PATCH 193/203] deps: update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 (#303) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [com.google.cloud:google-cloud-shared-dependencies](https://togithub.com/googleapis/java-shared-dependencies) | `3.0.3` -> `3.0.4` | [![age](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/compatibility-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/com.google.cloud:google-cloud-shared-dependencies/3.0.4/confidence-slim/3.0.3)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
googleapis/java-shared-dependencies ### [`v3.0.4`](https://togithub.com/googleapis/java-shared-dependencies/blob/HEAD/CHANGELOG.md#​304-httpsgithubcomgoogleapisjava-shared-dependenciescomparev303v304-2022-10-03) [Compare Source](https://togithub.com/googleapis/java-shared-dependencies/compare/v3.0.3...v3.0.4) ##### Dependencies - Update dependency cachetools to v5 ([#​816](https://togithub.com/googleapis/java-shared-dependencies/issues/816)) ([3f6c408](https://togithub.com/googleapis/java-shared-dependencies/commit/3f6c408210c931c286235f61c7aadea5bf5cfe4d)) - Update dependency certifi to v2022.9.24 ([#​818](https://togithub.com/googleapis/java-shared-dependencies/issues/818)) ([5f04b97](https://togithub.com/googleapis/java-shared-dependencies/commit/5f04b97c2343146600e8c9ee65afdeb58f5743a6)) - Update dependency charset-normalizer to v2.1.1 ([#​822](https://togithub.com/googleapis/java-shared-dependencies/issues/822)) ([6997c5a](https://togithub.com/googleapis/java-shared-dependencies/commit/6997c5acad937ebe3594330de73261a424d42cf3)) - Update dependency click to v8.1.3 ([#​823](https://togithub.com/googleapis/java-shared-dependencies/issues/823)) ([42bf9f8](https://togithub.com/googleapis/java-shared-dependencies/commit/42bf9f834fdafea60f2be7ccbf7d363e058cd7c2)) - Update dependency com.google.protobuf:protobuf-bom to v3.21.7 ([#​837](https://togithub.com/googleapis/java-shared-dependencies/issues/837)) ([d31e507](https://togithub.com/googleapis/java-shared-dependencies/commit/d31e5077c7e036de5e238e9a611df7ced527574a)) - Update dependency gcp-releasetool to v1.8.8 ([#​819](https://togithub.com/googleapis/java-shared-dependencies/issues/819)) ([8245d97](https://togithub.com/googleapis/java-shared-dependencies/commit/8245d975fb12e81454ec7664f9a7c9809bbac697)) - Update dependency gcp-releasetool to v1.8.9 ([#​846](https://togithub.com/googleapis/java-shared-dependencies/issues/846)) ([04e3283](https://togithub.com/googleapis/java-shared-dependencies/commit/04e32831c6e87c372444901013a747d2d02ce38d)) - Update dependency google-api-core to v2.10.1 ([#​824](https://togithub.com/googleapis/java-shared-dependencies/issues/824)) ([818b9aa](https://togithub.com/googleapis/java-shared-dependencies/commit/818b9aa2ac99d8b1f9b39a74b626122aed5f1d94)) - Update dependency google-auth to v2.12.0 ([#​825](https://togithub.com/googleapis/java-shared-dependencies/issues/825)) ([07c544b](https://togithub.com/googleapis/java-shared-dependencies/commit/07c544b5e0fa9f7110bbc957570f7a405962072e)) - Update dependency google-cloud-core to v2.3.2 ([#​820](https://togithub.com/googleapis/java-shared-dependencies/issues/820)) ([2a219e8](https://togithub.com/googleapis/java-shared-dependencies/commit/2a219e86f187ba5ad72f2570bd58ca6100128c43)) - Update dependency google-cloud-storage to v2.5.0 ([#​826](https://togithub.com/googleapis/java-shared-dependencies/issues/826)) ([bb10d18](https://togithub.com/googleapis/java-shared-dependencies/commit/bb10d1858a515f09d365362ffa0110a5b362c96b)) - Update dependency google-crc32c to v1.5.0 ([#​827](https://togithub.com/googleapis/java-shared-dependencies/issues/827)) ([7e5dae6](https://togithub.com/googleapis/java-shared-dependencies/commit/7e5dae60d667cb84b9ee4f6c977bdc35e79e4cf6)) - Update dependency google-resumable-media to v2.4.0 ([#​838](https://togithub.com/googleapis/java-shared-dependencies/issues/838)) ([ad82d63](https://togithub.com/googleapis/java-shared-dependencies/commit/ad82d6378f64039da383509638fb4782908eb4bc)) - Update dependency googleapis-common-protos to v1.56.4 ([#​821](https://togithub.com/googleapis/java-shared-dependencies/issues/821)) ([93d7745](https://togithub.com/googleapis/java-shared-dependencies/commit/93d77458c9bbf84ec367cdb4caaa41e6f71675c6)) - Update dependency importlib-metadata to v4.12.0 ([#​832](https://togithub.com/googleapis/java-shared-dependencies/issues/832)) ([ee19fb1](https://togithub.com/googleapis/java-shared-dependencies/commit/ee19fb1ca5a2a2e1985297e3b72d44de68bc72e3)) - Update dependency importlib-metadata to v4.13.0 ([#​843](https://togithub.com/googleapis/java-shared-dependencies/issues/843)) ([d2ede60](https://togithub.com/googleapis/java-shared-dependencies/commit/d2ede601eee8c875780c7eb5924623537480c509)) - Update dependency importlib-metadata to v5 ([#​845](https://togithub.com/googleapis/java-shared-dependencies/issues/845)) ([03ac7e8](https://togithub.com/googleapis/java-shared-dependencies/commit/03ac7e800274c5f58d2bc4ddd0561bfcdea1bb27)) - Update dependency io.grpc:grpc-bom to v1.49.1 ([#​802](https://togithub.com/googleapis/java-shared-dependencies/issues/802)) ([b8c54bf](https://togithub.com/googleapis/java-shared-dependencies/commit/b8c54bf8f1ddecc788cee151f8afe42de45bdc9d)) - Update dependency io.grpc:grpc-bom to v1.49.2 ([#​842](https://togithub.com/googleapis/java-shared-dependencies/issues/842)) ([1b1cfa2](https://togithub.com/googleapis/java-shared-dependencies/commit/1b1cfa27d05f7732da12721305cf41dcbebda232)) - Update dependency jeepney to v0.8.0 ([#​833](https://togithub.com/googleapis/java-shared-dependencies/issues/833)) ([15d2f9f](https://togithub.com/googleapis/java-shared-dependencies/commit/15d2f9f52b5a3259db0813df3d2424e256ccb372)) - Update dependency jinja2 to v3.1.2 ([#​834](https://togithub.com/googleapis/java-shared-dependencies/issues/834)) ([c188f95](https://togithub.com/googleapis/java-shared-dependencies/commit/c188f95acdb3349f1c4b3ed56e5fffb75e8fbc8d)) - Update dependency keyring to v23.9.3 ([#​828](https://togithub.com/googleapis/java-shared-dependencies/issues/828)) ([b185aaa](https://togithub.com/googleapis/java-shared-dependencies/commit/b185aaae716d4d97cb64f0426cac0e778f11223d)) - Update dependency markupsafe to v2.1.1 ([#​829](https://togithub.com/googleapis/java-shared-dependencies/issues/829)) ([add2825](https://togithub.com/googleapis/java-shared-dependencies/commit/add2825bd34cd80f529dbe0dadb3c84219177916)) - Update dependency org.threeten:threetenbp to v1.6.2 ([#​808](https://togithub.com/googleapis/java-shared-dependencies/issues/808)) ([2d2eabd](https://togithub.com/googleapis/java-shared-dependencies/commit/2d2eabd14d8150207885ea47280c0f7ff3d2962f)) - Update dependency protobuf to v3.20.2 ([#​830](https://togithub.com/googleapis/java-shared-dependencies/issues/830)) ([5afa76f](https://togithub.com/googleapis/java-shared-dependencies/commit/5afa76f9ef4705aecba49abc7bb93982fb1ecf3e)) - Update dependency protobuf to v3.20.3 ([#​839](https://togithub.com/googleapis/java-shared-dependencies/issues/839)) ([d9fc7dd](https://togithub.com/googleapis/java-shared-dependencies/commit/d9fc7ddd3e663458e6ea3f78a3c6241377df0319)) - Update dependency protobuf to v4 ([#​817](https://togithub.com/googleapis/java-shared-dependencies/issues/817)) ([ee8d154](https://togithub.com/googleapis/java-shared-dependencies/commit/ee8d154287ccd256b4dcfa48f28f5ec61a91fe3e)) - Update dependency pyjwt to v2.5.0 ([#​812](https://togithub.com/googleapis/java-shared-dependencies/issues/812)) ([4d4528e](https://togithub.com/googleapis/java-shared-dependencies/commit/4d4528e8ce269d49b99d2dbc4fcda2dc37a058cb)) - Update dependency requests to v2.28.1 ([#​813](https://togithub.com/googleapis/java-shared-dependencies/issues/813)) ([a3a8d89](https://togithub.com/googleapis/java-shared-dependencies/commit/a3a8d89b0117007a7108553c70aa82dd289e1691)) - Update dependency typing-extensions to v4.3.0 ([#​814](https://togithub.com/googleapis/java-shared-dependencies/issues/814)) ([da875e5](https://togithub.com/googleapis/java-shared-dependencies/commit/da875e5e91fa9d8c177e6c3afc9e34242eb914b7)) - Update dependency zipp to v3.8.1 ([#​815](https://togithub.com/googleapis/java-shared-dependencies/issues/815)) ([15585fd](https://togithub.com/googleapis/java-shared-dependencies/commit/15585fd0216013fe93be011f93f391f6269aa777)) - Update gax.version to v2.19.2 ([#​847](https://togithub.com/googleapis/java-shared-dependencies/issues/847)) ([c4afe1f](https://togithub.com/googleapis/java-shared-dependencies/commit/c4afe1fdc88af29ab039cea618d52c15c90e43e9)) - Update google.common-protos.version to v2.9.3 ([#​803](https://togithub.com/googleapis/java-shared-dependencies/issues/803)) ([a3e8e5e](https://togithub.com/googleapis/java-shared-dependencies/commit/a3e8e5eb53a8da14abf3b8d81a4f34fbb2f3b8f9)) - Update google.common-protos.version to v2.9.5 ([#​831](https://togithub.com/googleapis/java-shared-dependencies/issues/831)) ([1c901db](https://togithub.com/googleapis/java-shared-dependencies/commit/1c901db8a7740afaec3e809e51d4d369fbf469c4)) - Update google.common-protos.version to v2.9.6 ([#​844](https://togithub.com/googleapis/java-shared-dependencies/issues/844)) ([9e156be](https://togithub.com/googleapis/java-shared-dependencies/commit/9e156be59bd89959f04252c3045b8cd7a8be8070)) - Update google.core.version to v2.8.13 ([#​804](https://togithub.com/googleapis/java-shared-dependencies/issues/804)) ([45ae571](https://togithub.com/googleapis/java-shared-dependencies/commit/45ae57142bd6d5334eedd46243736b200a459795)) - Update google.core.version to v2.8.14 ([#​805](https://togithub.com/googleapis/java-shared-dependencies/issues/805)) ([02c9397](https://togithub.com/googleapis/java-shared-dependencies/commit/02c9397a84bf3fcca8d04e4c9867cc47689abde2)) - Update google.core.version to v2.8.15 ([#​807](https://togithub.com/googleapis/java-shared-dependencies/issues/807)) ([980856c](https://togithub.com/googleapis/java-shared-dependencies/commit/980856c43981992a3d08f69eac83aeada752d244)) - Update google.core.version to v2.8.16 ([#​810](https://togithub.com/googleapis/java-shared-dependencies/issues/810)) ([c2b2c9a](https://togithub.com/googleapis/java-shared-dependencies/commit/c2b2c9a327fd588f69524bb93a17e5d4ae8f5a42)) - Update google.core.version to v2.8.17 ([#​835](https://togithub.com/googleapis/java-shared-dependencies/issues/835)) ([3def21d](https://togithub.com/googleapis/java-shared-dependencies/commit/3def21df2e4253e3df0da064b6c4e472df079d2b)) - Update google.core.version to v2.8.18 ([#​840](https://togithub.com/googleapis/java-shared-dependencies/issues/840)) ([46566dc](https://togithub.com/googleapis/java-shared-dependencies/commit/46566dc18c4b1ed41c482b4ce21b92651e2f9dc5)) - Update google.core.version to v2.8.19 ([#​841](https://togithub.com/googleapis/java-shared-dependencies/issues/841)) ([99afde9](https://togithub.com/googleapis/java-shared-dependencies/commit/99afde97ea498f549eb75cc58c4ed88edf81b20d)) - Update google.core.version to v2.8.20 ([#​848](https://togithub.com/googleapis/java-shared-dependencies/issues/848)) ([c980c4f](https://togithub.com/googleapis/java-shared-dependencies/commit/c980c4fdfc8890d812b4881ba5b87bfd21269a5f)) - Update iam.version to v1.6.1 ([#​806](https://togithub.com/googleapis/java-shared-dependencies/issues/806)) ([a50158d](https://togithub.com/googleapis/java-shared-dependencies/commit/a50158d3b83cf8e02d8ee08c94e512b5669a927b)) - Update iam.version to v1.6.2 ([#​849](https://togithub.com/googleapis/java-shared-dependencies/issues/849)) ([e43ac96](https://togithub.com/googleapis/java-shared-dependencies/commit/e43ac96bc189a096a9311c9b03e85c86bea07e99))
--- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f4fb0f36..77de39f6 100644 --- a/pom.xml +++ b/pom.xml @@ -96,7 +96,7 @@ com.google.cloud google-cloud-shared-dependencies - 3.0.3 + 3.0.4 pom import From 7e92fc0b28f5b1bbf52e070e17431fb91d1666e8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 3 Oct 2022 19:22:19 +0000 Subject: [PATCH 194/203] chore(bazel): update protobuf to v3.21.7 (#302) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9 --- .../binaryauthorization/v1/Resources.java | 1327 ++++++--------- .../cloud/binaryauthorization/v1/Service.java | 1467 +++++++---------- .../v1beta1/AdmissionRule.java | 147 +- .../v1beta1/AdmissionWhitelistPattern.java | 114 +- .../binaryauthorization/v1beta1/Attestor.java | 180 +- .../v1beta1/AttestorPublicKey.java | 170 +- .../v1beta1/ContinuousValidationEvent.java | 665 +++----- .../v1beta1/CreateAttestorRequest.java | 150 +- .../v1beta1/DeleteAttestorRequest.java | 114 +- .../v1beta1/GetAttestorRequest.java | 114 +- .../v1beta1/GetPolicyRequest.java | 114 +- .../v1beta1/GetSystemPolicyRequest.java | 114 +- .../v1beta1/ListAttestorsRequest.java | 138 +- .../v1beta1/ListAttestorsResponse.java | 151 +- .../v1beta1/PkixPublicKey.java | 126 +- .../binaryauthorization/v1beta1/Policy.java | 374 ++--- .../v1beta1/UpdateAttestorRequest.java | 124 +- .../v1beta1/UpdatePolicyRequest.java | 124 +- .../v1beta1/UserOwnedDrydockNote.java | 164 +- 19 files changed, 2297 insertions(+), 3580 deletions(-) diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java index edfb6596..dd66c601 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java @@ -698,215 +698,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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)) { - admissionWhitelistPatterns_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern>(); - mutable_bitField0_ |= 0x00000001; - } - admissionWhitelistPatterns_.add( - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.parser(), - extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - clusterAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - clusterAdmissionRules__ = - input.readMessage( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusterAdmissionRules_ - .getMutableMap() - .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); - break; - } - case 34: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .Builder - subBuilder = null; - if (defaultAdmissionRule_ != null) { - subBuilder = defaultAdmissionRule_.toBuilder(); - } - defaultAdmissionRule_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultAdmissionRule_); - defaultAdmissionRule_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - globalPolicyEvaluationMode_ = rawValue; - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - kubernetesServiceAccountAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - input.readMessage( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - kubernetesServiceAccountAdmissionRules_ - .getMutableMap() - .put( - kubernetesServiceAccountAdmissionRules__.getKey(), - kubernetesServiceAccountAdmissionRules__.getValue()); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - istioServiceIdentityAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - istioServiceIdentityAdmissionRules__ = - input.readMessage( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - istioServiceIdentityAdmissionRules_ - .getMutableMap() - .put( - istioServiceIdentityAdmissionRules__.getKey(), - istioServiceIdentityAdmissionRules__.getValue()); - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - kubernetesNamespaceAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - input.readMessage( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - kubernetesNamespaceAdmissionRules_ - .getMutableMap() - .put( - kubernetesNamespaceAdmissionRules__.getKey(), - kubernetesNamespaceAdmissionRules__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; @@ -2115,7 +1906,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetKubernetesNamespaceAdmissionRules(), KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, 10); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2216,7 +2007,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, kubernetesNamespaceAdmissionRules__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2254,7 +2045,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2299,7 +2090,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2466,19 +2257,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAdmissionWhitelistPatternsFieldBuilder(); - } } @java.lang.Override @@ -2492,10 +2274,11 @@ public Builder clear() { if (admissionWhitelistPatternsBuilder_ == null) { admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + admissionWhitelistPatterns_ = null; admissionWhitelistPatternsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); internalGetMutableClusterAdmissionRules().clear(); internalGetMutableKubernetesNamespaceAdmissionRules().clear(); internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); @@ -2684,7 +2467,7 @@ public Builder mergeFrom( if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2699,19 +2482,149 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern + m = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionWhitelistPattern.parser(), + extensionRegistry); + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(m); + } else { + admissionWhitelistPatternsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + clusterAdmissionRules__ = + input.readMessage( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableClusterAdmissionRules() + .getMutableMap() + .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); + break; + } // case 26 + case 34: + { + input.readMessage( + getDefaultAdmissionRuleFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + globalPolicyEvaluationMode_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + input.readMessage( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableKubernetesServiceAccountAdmissionRules() + .getMutableMap() + .put( + kubernetesServiceAccountAdmissionRules__.getKey(), + kubernetesServiceAccountAdmissionRules__.getValue()); + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + istioServiceIdentityAdmissionRules__ = + input.readMessage( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableIstioServiceIdentityAdmissionRules() + .getMutableMap() + .put( + istioServiceIdentityAdmissionRules__.getKey(), + istioServiceIdentityAdmissionRules__.getValue()); + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + input.readMessage( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableKubernetesNamespaceAdmissionRules() + .getMutableMap() + .put( + kubernetesNamespaceAdmissionRules__.getKey(), + kubernetesNamespaceAdmissionRules__.getValue()); + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4926,7 +4839,19 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5017,52 +4942,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AdmissionWhitelistPattern( - 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(); - - namePattern_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; @@ -5152,7 +5031,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5164,7 +5043,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5187,7 +5066,7 @@ public boolean equals(final java.lang.Object obj) { obj; if (!getNamePattern().equals(other.getNamePattern())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5200,7 +5079,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_PATTERN_FIELD_NUMBER; hash = (53 * hash) + getNamePattern().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5356,17 +5235,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5477,7 +5349,7 @@ public Builder mergeFrom( namePattern_ = other.namePattern_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5492,21 +5364,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + namePattern_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5670,7 +5558,19 @@ public AdmissionWhitelistPattern parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AdmissionWhitelistPattern(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5875,73 +5775,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AdmissionRule( - 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(); - - evaluationMode_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requireAttestationsBy_.add(s); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - enforcementMode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; @@ -6517,7 +6350,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, enforcementMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6546,7 +6379,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, enforcementMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6568,7 +6401,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRequireAttestationsByList().equals(other.getRequireAttestationsByList())) return false; if (enforcementMode_ != other.enforcementMode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6587,7 +6420,7 @@ public int hashCode() { } hash = (37 * hash) + ENFORCEMENT_MODE_FIELD_NUMBER; hash = (53 * hash) + enforcementMode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6732,17 +6565,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6867,7 +6693,7 @@ public Builder mergeFrom( if (other.enforcementMode_ != 0) { setEnforcementModeValue(other.getEnforcementModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6882,20 +6708,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + evaluationMode_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.add(s); + break; + } // case 18 + case 24: + { + enforcementMode_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7402,7 +7258,19 @@ public AdmissionRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AdmissionRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7605,101 +7473,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Attestor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder - subBuilder = null; - if (attestorTypeCase_ == 3) { - subBuilder = - ((com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_) - .toBuilder(); - } - attestorType_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_); - attestorType_ = subBuilder.buildPartial(); - } - attestorTypeCase_ = 3; - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; @@ -8009,7 +7782,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8035,7 +7808,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8066,7 +7839,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8093,7 +7866,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8235,17 +8008,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8255,6 +8021,9 @@ public Builder clear() { description_ = ""; + if (userOwnedGrafeasNoteBuilder_ != null) { + userOwnedGrafeasNoteBuilder_.clear(); + } if (updateTimeBuilder_ == null) { updateTime_ = null; } else { @@ -8387,7 +8156,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8402,20 +8171,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + input.readMessage( + getUserOwnedGrafeasNoteFieldBuilder().getBuilder(), extensionRegistry); + attestorTypeCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9165,7 +8970,19 @@ public Attestor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Attestor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9404,79 +9221,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserOwnedGrafeasNote( - 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(); - - noteReference_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - publicKeys_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey>(); - mutable_bitField0_ |= 0x00000001; - } - publicKeys_.add( - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey.parser(), - extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - delegationServiceAccountEmail_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; @@ -9763,7 +9507,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, delegationServiceAccountEmail_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9783,7 +9527,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 3, delegationServiceAccountEmail_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9806,7 +9550,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPublicKeysList().equals(other.getPublicKeysList())) return false; if (!getDelegationServiceAccountEmail().equals(other.getDelegationServiceAccountEmail())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9825,7 +9569,7 @@ public int hashCode() { } hash = (37 * hash) + DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; hash = (53 * hash) + getDelegationServiceAccountEmail().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9981,19 +9725,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPublicKeysFieldBuilder(); - } } @java.lang.Override @@ -10003,10 +9738,11 @@ public Builder clear() { if (publicKeysBuilder_ == null) { publicKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + publicKeys_ = null; publicKeysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); delegationServiceAccountEmail_ = ""; return this; @@ -10149,7 +9885,7 @@ public Builder mergeFrom( delegationServiceAccountEmail_ = other.delegationServiceAccountEmail_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10164,20 +9900,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + noteReference_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey + m = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources + .AttestorPublicKey.parser(), + extensionRegistry); + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.add(m); + } else { + publicKeysBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + delegationServiceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11043,7 +10818,19 @@ public UserOwnedGrafeasNote parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserOwnedGrafeasNote(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11171,59 +10958,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PkixPublicKey( - 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(); - - publicKeyPem_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - signatureAlgorithm_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; @@ -11818,7 +11552,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, signatureAlgorithm_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11836,7 +11570,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, signatureAlgorithm_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11856,7 +11590,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPublicKeyPem().equals(other.getPublicKeyPem())) return false; if (signatureAlgorithm_ != other.signatureAlgorithm_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11871,7 +11605,7 @@ public int hashCode() { hash = (53 * hash) + getPublicKeyPem().hashCode(); hash = (37 * hash) + SIGNATURE_ALGORITHM_FIELD_NUMBER; hash = (53 * hash) + signatureAlgorithm_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12014,17 +11748,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -12132,7 +11859,7 @@ public Builder mergeFrom( if (other.signatureAlgorithm_ != 0) { setSignatureAlgorithmValue(other.getSignatureAlgorithmValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12147,20 +11874,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + publicKeyPem_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + signatureAlgorithm_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -12444,7 +12194,19 @@ public PkixPublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PkixPublicKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12678,93 +12440,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttestorPublicKey( - 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(); - - comment_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 3; - publicKey_ = s; - break; - } - case 42: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .Builder - subBuilder = null; - if (publicKeyCase_ == 5) { - subBuilder = - ((com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKey) - publicKey_) - .toBuilder(); - } - publicKey_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKey) - publicKey_); - publicKey_ = subBuilder.buildPartial(); - } - publicKeyCase_ = 5; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Resources .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; @@ -13128,7 +12803,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) publicKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13153,7 +12828,7 @@ public int getSerializedSize() { (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) publicKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13185,7 +12860,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13212,7 +12887,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13355,17 +13030,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -13375,6 +13043,9 @@ public Builder clear() { id_ = ""; + if (pkixPublicKeyBuilder_ != null) { + pkixPublicKeyBuilder_.clear(); + } publicKeyCase_ = 0; publicKey_ = null; return this; @@ -13507,7 +13178,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -13522,20 +13193,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + comment_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + publicKeyCase_ = 3; + publicKey_ = s; + break; + } // case 26 + case 42: + { + input.readMessage(getPkixPublicKeyFieldBuilder().getBuilder(), extensionRegistry); + publicKeyCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -14277,7 +13984,19 @@ public AttestorPublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttestorPublicKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java index 1037da0d..a62557cd 100644 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java +++ b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java @@ -97,52 +97,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; @@ -231,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -243,7 +197,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -262,7 +216,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -275,7 +229,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +370,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -530,7 +477,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -545,20 +492,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -720,7 +684,19 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -825,64 +801,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - 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.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder - subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; @@ -979,7 +897,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -991,7 +909,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1013,7 +931,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1028,7 +946,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1170,17 +1088,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1291,7 +1202,7 @@ public Builder mergeFrom( if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1306,20 +1217,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1590,7 +1518,19 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1752,78 +1692,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateAttestorRequest( - 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(); - - attestorId_ = s; - break; - } - case 26: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - subBuilder = null; - if (attestor_ != null) { - subBuilder = attestor_.toBuilder(); - } - attestor_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attestor_); - attestor_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; @@ -2028,7 +1896,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attestor_ != null) { output.writeMessage(3, getAttestor()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2046,7 +1914,7 @@ public int getSerializedSize() { if (attestor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttestor()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2070,7 +1938,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttestor()) { if (!getAttestor().equals(other.getAttestor())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2089,7 +1957,7 @@ public int hashCode() { hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; hash = (53 * hash) + getAttestor().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2244,17 +2112,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2380,7 +2241,7 @@ public Builder mergeFrom( if (other.hasAttestor()) { mergeAttestor(other.getAttestor()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2395,20 +2256,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + attestorId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2903,7 +2793,19 @@ public CreateAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2993,52 +2895,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAttestorRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; @@ -3128,7 +2984,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3140,7 +2996,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3159,7 +3015,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3172,7 +3028,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3314,17 +3170,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3428,7 +3277,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3443,20 +3292,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3618,7 +3484,19 @@ public GetAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3723,64 +3601,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAttestorRequest( - 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.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - subBuilder = null; - if (attestor_ != null) { - subBuilder = attestor_.toBuilder(); - } - attestor_ = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attestor_); - attestor_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; @@ -3877,7 +3697,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attestor_ != null) { output.writeMessage(1, getAttestor()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3889,7 +3709,7 @@ public int getSerializedSize() { if (attestor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAttestor()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3911,7 +3731,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttestor()) { if (!getAttestor().equals(other.getAttestor())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3926,7 +3746,7 @@ public int hashCode() { hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; hash = (53 * hash) + getAttestor().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4081,17 +3901,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4203,7 +4016,7 @@ public Builder mergeFrom( if (other.hasAttestor()) { mergeAttestor(other.getAttestor()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4218,20 +4031,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4504,7 +4334,19 @@ public UpdateAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4638,64 +4480,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAttestorsRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; @@ -4863,7 +4647,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4881,7 +4665,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4902,7 +4686,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4919,7 +4703,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5062,17 +4846,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5190,7 +4967,7 @@ public Builder mergeFrom( pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5205,20 +4982,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5551,7 +5357,19 @@ public ListAttestorsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAttestorsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5697,72 +5515,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAttestorsResponse( - 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)) { - attestors_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .Attestor>(); - mutable_bitField0_ |= 0x00000001; - } - attestors_.add( - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - attestors_ = java.util.Collections.unmodifiableList(attestors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; @@ -5928,7 +5680,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5943,7 +5695,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5963,7 +5715,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttestorsList().equals(other.getAttestorsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5980,7 +5732,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6135,19 +5887,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAttestorsFieldBuilder(); - } } @java.lang.Override @@ -6155,10 +5898,11 @@ public Builder clear() { super.clear(); if (attestorsBuilder_ == null) { attestors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + attestors_ = null; attestorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -6295,7 +6039,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6310,20 +6054,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor m = + input.readMessage( + com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor + .parser(), + extensionRegistry); + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.add(m); + } else { + attestorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6866,7 +6642,19 @@ public ListAttestorsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAttestorsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6956,52 +6744,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAttestorRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; @@ -7091,7 +6833,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7103,7 +6845,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7122,7 +6864,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7135,7 +6877,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7290,17 +7032,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7405,7 +7140,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7420,20 +7155,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7596,7 +7348,19 @@ public DeleteAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7686,52 +7450,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSystemPolicyRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; @@ -7821,7 +7539,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7833,7 +7551,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7853,7 +7571,7 @@ public boolean equals(final java.lang.Object obj) { obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7866,7 +7584,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8021,17 +7739,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8137,7 +7848,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8152,20 +7863,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8329,7 +8057,19 @@ public GetSystemPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSystemPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8526,82 +8266,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ValidateAttestationOccurrenceRequest( - 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(); - - attestor_ = s; - break; - } - case 18: - { - io.grafeas.v1.AttestationOccurrence.Builder subBuilder = null; - if (attestation_ != null) { - subBuilder = attestation_.toBuilder(); - } - attestation_ = - input.readMessage( - io.grafeas.v1.AttestationOccurrence.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attestation_); - attestation_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - occurrenceNote_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - occurrenceResourceUri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; @@ -8863,7 +8527,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, occurrenceResourceUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8884,7 +8548,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, occurrenceResourceUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8914,7 +8578,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getOccurrenceNote().equals(other.getOccurrenceNote())) return false; if (!getOccurrenceResourceUri().equals(other.getOccurrenceResourceUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8935,7 +8599,7 @@ public int hashCode() { hash = (53 * hash) + getOccurrenceNote().hashCode(); hash = (37 * hash) + OCCURRENCE_RESOURCE_URI_FIELD_NUMBER; hash = (53 * hash) + getOccurrenceResourceUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9093,17 +8757,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -9245,7 +8902,7 @@ public Builder mergeFrom( occurrenceResourceUri_ = other.occurrenceResourceUri_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9260,22 +8917,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attestor_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getAttestationFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + occurrenceNote_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + occurrenceResourceUri_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9886,7 +9576,19 @@ public ValidateAttestationOccurrenceRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ValidateAttestationOccurrenceRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10006,59 +9708,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ValidateAttestationOccurrenceResponse( - 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(); - - result_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - denialReason_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.protos.google.cloud.binaryauthorization.v1.Service .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; @@ -10357,7 +10006,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, denialReason_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10375,7 +10024,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, denialReason_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10400,7 +10049,7 @@ public boolean equals(final java.lang.Object obj) { if (result_ != other.result_) return false; if (!getDenialReason().equals(other.getDenialReason())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10415,7 +10064,7 @@ public int hashCode() { hash = (53 * hash) + result_; hash = (37 * hash) + DENIAL_REASON_FIELD_NUMBER; hash = (53 * hash) + getDenialReason().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10573,17 +10222,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10703,7 +10345,7 @@ public Builder mergeFrom( denialReason_ = other.denialReason_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10718,22 +10360,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + result_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + denialReason_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10994,7 +10657,19 @@ public ValidateAttestationOccurrenceResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ValidateAttestationOccurrenceResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java index 7457ce20..1a167d21 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java @@ -59,73 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AdmissionRule( - 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(); - - evaluationMode_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - requireAttestationsBy_.add(s); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - enforcementMode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor; @@ -689,7 +622,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, enforcementMode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -718,7 +651,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, enforcementMode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -737,7 +670,7 @@ public boolean equals(final java.lang.Object obj) { if (evaluationMode_ != other.evaluationMode_) return false; if (!getRequireAttestationsByList().equals(other.getRequireAttestationsByList())) return false; if (enforcementMode_ != other.enforcementMode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -756,7 +689,7 @@ public int hashCode() { } hash = (37 * hash) + ENFORCEMENT_MODE_FIELD_NUMBER; hash = (53 * hash) + enforcementMode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -891,17 +824,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1014,7 +940,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.AdmissionR if (other.enforcementMode_ != 0) { setEnforcementModeValue(other.getEnforcementModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1029,18 +955,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + evaluationMode_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRequireAttestationsByIsMutable(); + requireAttestationsBy_.add(s); + break; + } // case 18 + case 24: + { + enforcementMode_ = input.readEnum(); + + break; + } // case 24 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.AdmissionRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1522,7 +1480,18 @@ public AdmissionRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AdmissionRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java index bf7fe22e..08a69a26 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AdmissionWhitelistPattern( - 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(); - - namePattern_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; @@ -192,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -204,7 +158,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +175,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) obj; if (!getNamePattern().equals(other.getNamePattern())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -234,7 +188,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_PATTERN_FIELD_NUMBER; hash = (53 * hash) + getNamePattern().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -367,17 +321,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -473,7 +420,7 @@ public Builder mergeFrom( namePattern_ = other.namePattern_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -488,19 +435,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + namePattern_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -674,7 +639,18 @@ public AdmissionWhitelistPattern parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AdmissionWhitelistPattern(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java index 3bd13346..eb695199 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java @@ -55,97 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Attestor( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 26: - { - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder subBuilder = - null; - if (attestorTypeCase_ == 3) { - subBuilder = - ((com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - attestorType_) - .toBuilder(); - } - attestorType_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - attestorType_); - attestorType_ = subBuilder.buildPartial(); - } - attestorTypeCase_ = 3; - 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: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor; @@ -442,7 +351,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -465,7 +374,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -495,7 +404,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -522,7 +431,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +563,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.Attestor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -674,6 +576,9 @@ public Builder clear() { description_ = ""; + if (userOwnedDrydockNoteBuilder_ != null) { + userOwnedDrydockNoteBuilder_.clear(); + } if (updateTimeBuilder_ == null) { updateTime_ = null; } else { @@ -796,7 +701,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.Attestor o break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -811,18 +716,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.Attestor parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + input.readMessage( + getUserOwnedDrydockNoteFieldBuilder().getBuilder(), extensionRegistry); + attestorTypeCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.Attestor) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1536,7 +1479,18 @@ public Attestor parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Attestor(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java index 005f7715..c17aa8eb 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java @@ -54,86 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttestorPublicKey( - 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(); - - comment_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 3; - publicKey_ = s; - break; - } - case 42: - { - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder subBuilder = null; - if (publicKeyCase_ == 5) { - subBuilder = - ((com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_) - .toBuilder(); - } - publicKey_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_); - publicKey_ = subBuilder.buildPartial(); - } - publicKeyCase_ = 5; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor; @@ -488,7 +408,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 5, (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -511,7 +431,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 5, (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -541,7 +461,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -568,7 +488,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -699,17 +619,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -719,6 +632,9 @@ public Builder clear() { id_ = ""; + if (pkixPublicKeyBuilder_ != null) { + pkixPublicKeyBuilder_.clear(); + } publicKeyCase_ = 0; publicKey_ = null; return this; @@ -839,7 +755,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.AttestorPu break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -854,19 +770,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + comment_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + publicKeyCase_ = 3; + publicKey_ = s; + break; + } // case 26 + case 42: + { + input.readMessage(getPkixPublicKeyFieldBuilder().getBuilder(), extensionRegistry); + publicKeyCase_ = 5; + break; + } // case 42 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1589,7 +1542,18 @@ public AttestorPublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttestorPublicKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java index 4f694d1f..fd73abe9 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java @@ -50,99 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ContinuousValidationEvent( - 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.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder - subBuilder = null; - if (eventTypeCase_ == 1) { - subBuilder = - ((com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_) - .toBuilder(); - } - eventType_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_); - eventType_ = subBuilder.buildPartial(); - } - eventTypeCase_ = 1; - break; - } - case 18: - { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder - subBuilder = null; - if (eventTypeCase_ == 2) { - subBuilder = - ((com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_) - .toBuilder(); - } - eventType_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_); - eventType_ = subBuilder.buildPartial(); - } - eventTypeCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.ContinuousValidationLoggingProto .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor; @@ -426,116 +333,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ContinuousValidationPodEvent( - 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(); - - pod_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deployTime_ != null) { - subBuilder = deployTime_.toBuilder(); - } - deployTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deployTime_); - deployTime_ = 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 32: - { - int rawValue = input.readEnum(); - - verdict_ = rawValue; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - images_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails>(); - mutable_bitField0_ |= 0x00000001; - } - images_.add( - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.parser(), - extensionRegistry)); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - podNamespace_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - images_ = java.util.Collections.unmodifiableList(images_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor; @@ -818,67 +615,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImageDetails( - 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(); - - image_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - result_ = rawValue; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.ContinuousValidationLoggingProto .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor; @@ -1232,7 +968,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1253,7 +989,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1279,7 +1015,7 @@ public boolean equals(final java.lang.Object obj) { if (!getImage().equals(other.getImage())) return false; if (result_ != other.result_) return false; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1296,7 +1032,7 @@ public int hashCode() { hash = (53 * hash) + result_; hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1455,17 +1191,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1592,7 +1321,7 @@ public Builder mergeFrom( description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1607,22 +1336,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + image_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + result_ = input.readEnum(); + + break; + } // case 16 + case 26: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1989,7 +1745,19 @@ public ImageDetails parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImageDetails(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2376,7 +2144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, podNamespace_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2407,7 +2175,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, podNamespace_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2442,7 +2210,7 @@ public boolean equals(final java.lang.Object obj) { } if (verdict_ != other.verdict_) return false; if (!getImagesList().equals(other.getImagesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2471,7 +2239,7 @@ public int hashCode() { hash = (37 * hash) + IMAGES_FIELD_NUMBER; hash = (53 * hash) + getImagesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2628,19 +2396,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getImagesFieldBuilder(); - } } @java.lang.Override @@ -2666,10 +2425,11 @@ public Builder clear() { if (imagesBuilder_ == null) { images_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + images_ = null; imagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -2838,7 +2598,7 @@ public Builder mergeFrom( } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2853,22 +2613,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pod_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getDeployTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + verdict_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent + .ContinuousValidationPodEvent.ImageDetails + m = + input.readMessage( + com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent + .ContinuousValidationPodEvent.ImageDetails.parser(), + extensionRegistry); + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(m); + } else { + imagesBuilder_.addMessage(m); + } + break; + } // case 42 + case 58: + { + podNamespace_ = input.readStringRequireUtf8(); + + break; + } // case 58 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4047,7 +3863,19 @@ public ContinuousValidationPodEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContinuousValidationPodEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4133,52 +3961,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UnsupportedPolicyEvent( - 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(); - - description_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.ContinuousValidationLoggingProto .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor; @@ -4262,7 +4044,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4274,7 +4056,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4297,7 +4079,7 @@ public boolean equals(final java.lang.Object obj) { obj; if (!getDescription().equals(other.getDescription())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4310,7 +4092,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4467,17 +4249,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4591,7 +4366,7 @@ public Builder mergeFrom( description_ = other.description_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4606,22 +4381,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4770,7 +4560,19 @@ public UnsupportedPolicyEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UnsupportedPolicyEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5000,7 +4802,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .UnsupportedPolicyEvent) eventType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5025,7 +4827,7 @@ public int getSerializedSize() { .UnsupportedPolicyEvent) eventType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5052,7 +4854,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5075,7 +4877,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5207,22 +5009,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.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 (podEventBuilder_ != null) { + podEventBuilder_.clear(); + } + if (unsupportedPolicyEventBuilder_ != null) { + unsupportedPolicyEventBuilder_.clear(); + } eventTypeCase_ = 0; eventType_ = null; return this; @@ -5339,7 +5140,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5354,19 +5155,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPodEventFieldBuilder().getBuilder(), extensionRegistry); + eventTypeCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage( + getUnsupportedPolicyEventFieldBuilder().getBuilder(), extensionRegistry); + eventTypeCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5952,7 +5778,18 @@ public ContinuousValidationEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ContinuousValidationEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java index 7f1414ce..44344114 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateAttestorRequest( - 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(); - - attestorId_ = s; - break; - } - case 26: - { - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder subBuilder = null; - if (attestor_ != null) { - subBuilder = attestor_.toBuilder(); - } - attestor_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.Attestor.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attestor_); - attestor_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor; @@ -323,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attestor_ != null) { output.writeMessage(3, getAttestor()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,7 +271,7 @@ public int getSerializedSize() { if (attestor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttestor()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +293,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttestor()) { if (!getAttestor().equals(other.getAttestor())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +312,7 @@ public int hashCode() { hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; hash = (53 * hash) + getAttestor().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -514,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -640,7 +563,7 @@ public Builder mergeFrom( if (other.hasAttestor()) { mergeAttestor(other.getAttestor()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -655,19 +578,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + attestorId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1149,7 +1102,18 @@ public CreateAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java index 36c5c611..a96b1554 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteAttestorRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -359,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +411,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,19 +426,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -650,7 +615,18 @@ public DeleteAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java index a7858093..b5a88c02 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAttestorRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,19 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -646,7 +611,18 @@ public GetAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java index 96103149..87fb4ec5 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -459,7 +406,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.GetPolicyR name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -474,19 +421,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +609,18 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java index 3b8825f4..ec220816 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetSystemPolicyRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -359,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +411,7 @@ public Builder mergeFrom( name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,19 +426,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -650,7 +615,18 @@ public GetSystemPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetSystemPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java index 3202f69b..529f432d 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAttestorsRequest( - 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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor; @@ -276,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -294,7 +236,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +255,7 @@ public boolean equals(final java.lang.Object 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; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +272,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -578,7 +513,7 @@ public Builder mergeFrom( pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -593,19 +528,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -935,7 +900,18 @@ public ListAttestorsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAttestorsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java index ede964d3..c25792be 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java @@ -53,70 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListAttestorsResponse( - 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)) { - attestors_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.Attestor>(); - mutable_bitField0_ |= 0x00000001; - } - attestors_.add( - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.Attestor.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 (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - attestors_ = java.util.Collections.unmodifiableList(attestors_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor; @@ -275,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +226,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +244,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttestorsList().equals(other.getAttestorsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +261,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,19 +393,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAttestorsFieldBuilder(); - } } @java.lang.Override @@ -477,10 +404,11 @@ public Builder clear() { super.clear(); if (attestorsBuilder_ == null) { attestors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + attestors_ = null; attestorsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -607,7 +535,7 @@ public Builder mergeFrom( nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,19 +550,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.binaryauthorization.v1beta1.Attestor m = + input.readMessage( + com.google.cloud.binaryauthorization.v1beta1.Attestor.parser(), + extensionRegistry); + if (attestorsBuilder_ == null) { + ensureAttestorsIsMutable(); + attestors_.add(m); + } else { + attestorsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1150,7 +1110,18 @@ public ListAttestorsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListAttestorsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java index 39a019d1..6244a124 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java @@ -56,59 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PkixPublicKey( - 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(); - - publicKeyPem_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - signatureAlgorithm_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor; @@ -697,7 +644,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, signatureAlgorithm_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -715,7 +662,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, signatureAlgorithm_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -733,7 +680,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPublicKeyPem().equals(other.getPublicKeyPem())) return false; if (signatureAlgorithm_ != other.signatureAlgorithm_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -748,7 +695,7 @@ public int hashCode() { hash = (53 * hash) + getPublicKeyPem().hashCode(); hash = (37 * hash) + SIGNATURE_ALGORITHM_FIELD_NUMBER; hash = (53 * hash) + signatureAlgorithm_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -881,17 +828,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -987,7 +927,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.PkixPublic if (other.signatureAlgorithm_ != 0) { setSignatureAlgorithmValue(other.getSignatureAlgorithmValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1002,18 +942,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + publicKeyPem_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + signatureAlgorithm_ = input.readEnum(); + + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1287,7 +1252,18 @@ public PkixPublicKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PkixPublicKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java index 90d7a396..ec210dd1 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java @@ -55,203 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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)) { - admissionWhitelistPatterns_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern>(); - mutable_bitField0_ |= 0x00000001; - } - admissionWhitelistPatterns_.add( - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .parser(), - extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - clusterAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules__ = - input.readMessage( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - clusterAdmissionRules_ - .getMutableMap() - .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); - break; - } - case 34: - { - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder subBuilder = null; - if (defaultAdmissionRule_ != null) { - subBuilder = defaultAdmissionRule_.toBuilder(); - } - defaultAdmissionRule_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultAdmissionRule_); - defaultAdmissionRule_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - globalPolicyEvaluationMode_ = rawValue; - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - kubernetesServiceAccountAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - input.readMessage( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - kubernetesServiceAccountAdmissionRules_ - .getMutableMap() - .put( - kubernetesServiceAccountAdmissionRules__.getKey(), - kubernetesServiceAccountAdmissionRules__.getValue()); - break; - } - case 74: - { - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - istioServiceIdentityAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000010; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - istioServiceIdentityAdmissionRules__ = - input.readMessage( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - istioServiceIdentityAdmissionRules_ - .getMutableMap() - .put( - istioServiceIdentityAdmissionRules__.getKey(), - istioServiceIdentityAdmissionRules__.getValue()); - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - kubernetesNamespaceAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - input.readMessage( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - kubernetesNamespaceAdmissionRules_ - .getMutableMap() - .put( - kubernetesNamespaceAdmissionRules__.getKey(), - kubernetesNamespaceAdmissionRules__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor; @@ -1396,7 +1199,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetKubernetesNamespaceAdmissionRules(), KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, 10); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1487,7 +1290,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 10, kubernetesNamespaceAdmissionRules__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1524,7 +1327,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1569,7 +1372,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1730,19 +1533,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.binaryauthorization.v1beta1.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAdmissionWhitelistPatternsFieldBuilder(); - } } @java.lang.Override @@ -1756,10 +1550,11 @@ public Builder clear() { if (admissionWhitelistPatternsBuilder_ == null) { admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + admissionWhitelistPatterns_ = null; admissionWhitelistPatternsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); internalGetMutableClusterAdmissionRules().clear(); internalGetMutableKubernetesNamespaceAdmissionRules().clear(); internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); @@ -1937,7 +1732,7 @@ public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.Policy oth if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1952,18 +1747,142 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern m = + input.readMessage( + com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern + .parser(), + extensionRegistry); + if (admissionWhitelistPatternsBuilder_ == null) { + ensureAdmissionWhitelistPatternsIsMutable(); + admissionWhitelistPatterns_.add(m); + } else { + admissionWhitelistPatternsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + clusterAdmissionRules__ = + input.readMessage( + ClusterAdmissionRulesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableClusterAdmissionRules() + .getMutableMap() + .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); + break; + } // case 26 + case 34: + { + input.readMessage( + getDefaultAdmissionRuleFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: + { + globalPolicyEvaluationMode_ = input.readEnum(); + + break; + } // case 56 + case 66: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesServiceAccountAdmissionRules__ = + input.readMessage( + KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableKubernetesServiceAccountAdmissionRules() + .getMutableMap() + .put( + kubernetesServiceAccountAdmissionRules__.getKey(), + kubernetesServiceAccountAdmissionRules__.getValue()); + break; + } // case 66 + case 74: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + istioServiceIdentityAdmissionRules__ = + input.readMessage( + IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableIstioServiceIdentityAdmissionRules() + .getMutableMap() + .put( + istioServiceIdentityAdmissionRules__.getKey(), + istioServiceIdentityAdmissionRules__.getValue()); + break; + } // case 74 + case 82: + { + com.google.protobuf.MapEntry< + java.lang.String, + com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> + kubernetesNamespaceAdmissionRules__ = + input.readMessage( + KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableKubernetesNamespaceAdmissionRules() + .getMutableMap() + .put( + kubernetesNamespaceAdmissionRules__.getKey(), + kubernetesNamespaceAdmissionRules__.getValue()); + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4071,7 +3990,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java index 30e70531..f11fb2cd 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAttestorRequest( - 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.binaryauthorization.v1beta1.Attestor.Builder subBuilder = null; - if (attestor_ != null) { - subBuilder = attestor_.toBuilder(); - } - attestor_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.Attestor.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attestor_); - attestor_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor; @@ -198,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (attestor_ != null) { output.writeMessage(1, getAttestor()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +154,7 @@ public int getSerializedSize() { if (attestor_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAttestor()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -230,7 +174,7 @@ public boolean equals(final java.lang.Object obj) { if (hasAttestor()) { if (!getAttestor().equals(other.getAttestor())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -245,7 +189,7 @@ public int hashCode() { hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; hash = (53 * hash) + getAttestor().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -377,17 +321,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -489,7 +426,7 @@ public Builder mergeFrom( if (other.hasAttestor()) { mergeAttestor(other.getAttestor()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -504,19 +441,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -776,7 +731,18 @@ public UpdateAttestorRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAttestorRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java index 5fdcdacf..a7b1e1c6 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java @@ -50,62 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - 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.binaryauthorization.v1beta1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.Policy.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor; @@ -198,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +154,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -230,7 +174,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -245,7 +189,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -375,17 +319,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -485,7 +422,7 @@ public Builder mergeFrom( if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -500,19 +437,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -772,7 +727,18 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java index 83aea8f7..9abea7bc 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java +++ b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java @@ -55,77 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserOwnedDrydockNote( - 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(); - - noteReference_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - publicKeys_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey>(); - mutable_bitField0_ |= 0x00000001; - } - publicKeys_.add( - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.parser(), - extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - delegationServiceAccountEmail_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor; @@ -401,7 +330,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, delegationServiceAccountEmail_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -421,7 +350,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 3, delegationServiceAccountEmail_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -441,7 +370,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPublicKeysList().equals(other.getPublicKeysList())) return false; if (!getDelegationServiceAccountEmail().equals(other.getDelegationServiceAccountEmail())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -460,7 +389,7 @@ public int hashCode() { } hash = (37 * hash) + DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; hash = (53 * hash) + getDelegationServiceAccountEmail().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -593,19 +522,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPublicKeysFieldBuilder(); - } } @java.lang.Override @@ -615,10 +535,11 @@ public Builder clear() { if (publicKeysBuilder_ == null) { publicKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + publicKeys_ = null; publicKeysBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); delegationServiceAccountEmail_ = ""; return this; @@ -748,7 +669,7 @@ public Builder mergeFrom( delegationServiceAccountEmail_ = other.delegationServiceAccountEmail_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -763,19 +684,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + noteReference_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey m = + input.readMessage( + com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.parser(), + extensionRegistry); + if (publicKeysBuilder_ == null) { + ensurePublicKeysIsMutable(); + publicKeys_.add(m); + } else { + publicKeysBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + delegationServiceAccountEmail_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1608,7 +1567,18 @@ public UserOwnedDrydockNote parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserOwnedDrydockNote(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; From 34f6a24433abc815014778f68d0a6e4a60dbedd8 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 23:36:13 +0000 Subject: [PATCH 195/203] chore(main): release 1.2.8 (#298) :robot: I have created a release *beep* *boop* --- ## [1.2.8](https://togithub.com/googleapis/java-binary-authorization/compare/v1.2.7...v1.2.8) (2022-10-04) ### Bug Fixes * update protobuf to v3.21.7 ([7e92fc0](https://togithub.com/googleapis/java-binary-authorization/commit/7e92fc0b28f5b1bbf52e070e17431fb91d1666e8)) ### Documentation * [owlbot-java] samples do not need deploy plugin and deps upgrade ([#1583](https://togithub.com/googleapis/java-binary-authorization/issues/1583)) ([#273](https://togithub.com/googleapis/java-binary-authorization/issues/273)) ([20c56f3](https://togithub.com/googleapis/java-binary-authorization/commit/20c56f386d5516848c662473a377af35b8eb4930)) ### Dependencies * Update dependency cachetools to v5 ([#296](https://togithub.com/googleapis/java-binary-authorization/issues/296)) ([99775f2](https://togithub.com/googleapis/java-binary-authorization/commit/99775f2926da14724916464a2eb284fb188e17cf)) * Update dependency certifi to v2022.9.24 ([#276](https://togithub.com/googleapis/java-binary-authorization/issues/276)) ([1640a69](https://togithub.com/googleapis/java-binary-authorization/commit/1640a694e1a93626b84746ffd3064abdd2a13e03)) * Update dependency charset-normalizer to v2.1.1 ([#280](https://togithub.com/googleapis/java-binary-authorization/issues/280)) ([2e3f88a](https://togithub.com/googleapis/java-binary-authorization/commit/2e3f88acbb06f8a85486c33b260d75477f41a200)) * Update dependency click to v8.1.3 ([#281](https://togithub.com/googleapis/java-binary-authorization/issues/281)) ([06784ed](https://togithub.com/googleapis/java-binary-authorization/commit/06784edc130cb1c12ba332c015cc3bc91bb94449)) * Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#303](https://togithub.com/googleapis/java-binary-authorization/issues/303)) ([30f22c2](https://togithub.com/googleapis/java-binary-authorization/commit/30f22c2a2eee01a07c49b6c4063c0b0fb51d8c76)) * Update dependency gcp-releasetool to v1.8.8 ([#277](https://togithub.com/googleapis/java-binary-authorization/issues/277)) ([628c44f](https://togithub.com/googleapis/java-binary-authorization/commit/628c44f5cd15373234fc9e74a24508b8c754bd38)) * Update dependency google-api-core to v2.10.1 ([#282](https://togithub.com/googleapis/java-binary-authorization/issues/282)) ([8991507](https://togithub.com/googleapis/java-binary-authorization/commit/89915070e073b8b190871f9277b14aa9a83aff1a)) * Update dependency google-auth to v2.12.0 ([#283](https://togithub.com/googleapis/java-binary-authorization/issues/283)) ([21a18c3](https://togithub.com/googleapis/java-binary-authorization/commit/21a18c3bdf9c3d8cb7b9373fb90bc877c7bc460b)) * Update dependency google-cloud-core to v2.3.2 ([#278](https://togithub.com/googleapis/java-binary-authorization/issues/278)) ([7798d5b](https://togithub.com/googleapis/java-binary-authorization/commit/7798d5b247e4ce33234c3b021cd6f90bae0dab90)) * Update dependency google-cloud-storage to v2.5.0 ([#284](https://togithub.com/googleapis/java-binary-authorization/issues/284)) ([9db78e3](https://togithub.com/googleapis/java-binary-authorization/commit/9db78e36ff0ec71f55c3a461d67ec88dc7438e2c)) * Update dependency google-crc32c to v1.5.0 ([#285](https://togithub.com/googleapis/java-binary-authorization/issues/285)) ([11256f6](https://togithub.com/googleapis/java-binary-authorization/commit/11256f60434380193875a9de6a36175bb387963c)) * Update dependency google-resumable-media to v2.4.0 ([#299](https://togithub.com/googleapis/java-binary-authorization/issues/299)) ([12ddbb9](https://togithub.com/googleapis/java-binary-authorization/commit/12ddbb97f55f9fbec37b40caa20c0ece53d1d177)) * Update dependency googleapis-common-protos to v1.56.4 ([#279](https://togithub.com/googleapis/java-binary-authorization/issues/279)) ([9709b14](https://togithub.com/googleapis/java-binary-authorization/commit/9709b14bcabc8ef5283c9d902bfa54fb92f7bbf1)) * Update dependency importlib-metadata to v4.12.0 ([#286](https://togithub.com/googleapis/java-binary-authorization/issues/286)) ([f51db10](https://togithub.com/googleapis/java-binary-authorization/commit/f51db100aa1becd3b3860dba462add09887f3dbb)) * Update dependency jeepney to v0.8.0 ([#287](https://togithub.com/googleapis/java-binary-authorization/issues/287)) ([b951c37](https://togithub.com/googleapis/java-binary-authorization/commit/b951c37239b55920bfd89dedb96af7b1397a4caa)) * Update dependency jinja2 to v3.1.2 ([#288](https://togithub.com/googleapis/java-binary-authorization/issues/288)) ([ffd2347](https://togithub.com/googleapis/java-binary-authorization/commit/ffd2347ba6a157110d0c4925df8979840ffc7197)) * Update dependency keyring to v23.9.3 ([#289](https://togithub.com/googleapis/java-binary-authorization/issues/289)) ([7078803](https://togithub.com/googleapis/java-binary-authorization/commit/7078803a0cde79de542d292574aac2677835bae2)) * Update dependency markupsafe to v2.1.1 ([#290](https://togithub.com/googleapis/java-binary-authorization/issues/290)) ([5469e46](https://togithub.com/googleapis/java-binary-authorization/commit/5469e46df1ac140ca4d308eeb43bfb41d341a72a)) * Update dependency protobuf to v3.20.2 ([#291](https://togithub.com/googleapis/java-binary-authorization/issues/291)) ([9644c7f](https://togithub.com/googleapis/java-binary-authorization/commit/9644c7f679a786aaea6686eaf219142003f1ea11)) * Update dependency protobuf to v3.20.3 ([#300](https://togithub.com/googleapis/java-binary-authorization/issues/300)) ([a5b20f7](https://togithub.com/googleapis/java-binary-authorization/commit/a5b20f7364ccf3e4c91bd86efd55c4e5b6eb15c7)) * Update dependency protobuf to v4 ([#297](https://togithub.com/googleapis/java-binary-authorization/issues/297)) ([bc3ba5f](https://togithub.com/googleapis/java-binary-authorization/commit/bc3ba5f176dec003fe555becd1bce6e2cc415c29)) * Update dependency pyjwt to v2.5.0 ([#292](https://togithub.com/googleapis/java-binary-authorization/issues/292)) ([5716f17](https://togithub.com/googleapis/java-binary-authorization/commit/5716f177c2f26190ec9ca6c6ccd0a321a75b553d)) * Update dependency requests to v2.28.1 ([#293](https://togithub.com/googleapis/java-binary-authorization/issues/293)) ([9212623](https://togithub.com/googleapis/java-binary-authorization/commit/92126233c88c5d993c9d1b1402f103c65c3cb2bd)) * Update dependency typing-extensions to v4.3.0 ([#294](https://togithub.com/googleapis/java-binary-authorization/issues/294)) ([496eed2](https://togithub.com/googleapis/java-binary-authorization/commit/496eed218c7fa57b1007e9f4c3977ea04d2f2bde)) * Update dependency zipp to v3.8.1 ([#295](https://togithub.com/googleapis/java-binary-authorization/issues/295)) ([43a78ce](https://togithub.com/googleapis/java-binary-authorization/commit/43a78ce22a83ec39cdeca08d73be79bfd00c28fc)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- CHANGELOG.md | 41 +++++++++++++++++++ google-cloud-binary-authorization-bom/pom.xml | 12 +++--- google-cloud-binary-authorization/pom.xml | 4 +- .../pom.xml | 4 +- .../pom.xml | 4 +- pom.xml | 12 +++--- .../pom.xml | 4 +- .../pom.xml | 4 +- versions.txt | 10 ++--- 9 files changed, 68 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ad20168..798bf0f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,46 @@ # Changelog +## [1.2.8](https://github.com/googleapis/java-binary-authorization/compare/v1.2.7...v1.2.8) (2022-10-04) + + +### Bug Fixes + +* update protobuf to v3.21.7 ([7e92fc0](https://github.com/googleapis/java-binary-authorization/commit/7e92fc0b28f5b1bbf52e070e17431fb91d1666e8)) + + +### Documentation + +* [owlbot-java] samples do not need deploy plugin and deps upgrade ([#1583](https://github.com/googleapis/java-binary-authorization/issues/1583)) ([#273](https://github.com/googleapis/java-binary-authorization/issues/273)) ([20c56f3](https://github.com/googleapis/java-binary-authorization/commit/20c56f386d5516848c662473a377af35b8eb4930)) + + +### Dependencies + +* Update dependency cachetools to v5 ([#296](https://github.com/googleapis/java-binary-authorization/issues/296)) ([99775f2](https://github.com/googleapis/java-binary-authorization/commit/99775f2926da14724916464a2eb284fb188e17cf)) +* Update dependency certifi to v2022.9.24 ([#276](https://github.com/googleapis/java-binary-authorization/issues/276)) ([1640a69](https://github.com/googleapis/java-binary-authorization/commit/1640a694e1a93626b84746ffd3064abdd2a13e03)) +* Update dependency charset-normalizer to v2.1.1 ([#280](https://github.com/googleapis/java-binary-authorization/issues/280)) ([2e3f88a](https://github.com/googleapis/java-binary-authorization/commit/2e3f88acbb06f8a85486c33b260d75477f41a200)) +* Update dependency click to v8.1.3 ([#281](https://github.com/googleapis/java-binary-authorization/issues/281)) ([06784ed](https://github.com/googleapis/java-binary-authorization/commit/06784edc130cb1c12ba332c015cc3bc91bb94449)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#303](https://github.com/googleapis/java-binary-authorization/issues/303)) ([30f22c2](https://github.com/googleapis/java-binary-authorization/commit/30f22c2a2eee01a07c49b6c4063c0b0fb51d8c76)) +* Update dependency gcp-releasetool to v1.8.8 ([#277](https://github.com/googleapis/java-binary-authorization/issues/277)) ([628c44f](https://github.com/googleapis/java-binary-authorization/commit/628c44f5cd15373234fc9e74a24508b8c754bd38)) +* Update dependency google-api-core to v2.10.1 ([#282](https://github.com/googleapis/java-binary-authorization/issues/282)) ([8991507](https://github.com/googleapis/java-binary-authorization/commit/89915070e073b8b190871f9277b14aa9a83aff1a)) +* Update dependency google-auth to v2.12.0 ([#283](https://github.com/googleapis/java-binary-authorization/issues/283)) ([21a18c3](https://github.com/googleapis/java-binary-authorization/commit/21a18c3bdf9c3d8cb7b9373fb90bc877c7bc460b)) +* Update dependency google-cloud-core to v2.3.2 ([#278](https://github.com/googleapis/java-binary-authorization/issues/278)) ([7798d5b](https://github.com/googleapis/java-binary-authorization/commit/7798d5b247e4ce33234c3b021cd6f90bae0dab90)) +* Update dependency google-cloud-storage to v2.5.0 ([#284](https://github.com/googleapis/java-binary-authorization/issues/284)) ([9db78e3](https://github.com/googleapis/java-binary-authorization/commit/9db78e36ff0ec71f55c3a461d67ec88dc7438e2c)) +* Update dependency google-crc32c to v1.5.0 ([#285](https://github.com/googleapis/java-binary-authorization/issues/285)) ([11256f6](https://github.com/googleapis/java-binary-authorization/commit/11256f60434380193875a9de6a36175bb387963c)) +* Update dependency google-resumable-media to v2.4.0 ([#299](https://github.com/googleapis/java-binary-authorization/issues/299)) ([12ddbb9](https://github.com/googleapis/java-binary-authorization/commit/12ddbb97f55f9fbec37b40caa20c0ece53d1d177)) +* Update dependency googleapis-common-protos to v1.56.4 ([#279](https://github.com/googleapis/java-binary-authorization/issues/279)) ([9709b14](https://github.com/googleapis/java-binary-authorization/commit/9709b14bcabc8ef5283c9d902bfa54fb92f7bbf1)) +* Update dependency importlib-metadata to v4.12.0 ([#286](https://github.com/googleapis/java-binary-authorization/issues/286)) ([f51db10](https://github.com/googleapis/java-binary-authorization/commit/f51db100aa1becd3b3860dba462add09887f3dbb)) +* Update dependency jeepney to v0.8.0 ([#287](https://github.com/googleapis/java-binary-authorization/issues/287)) ([b951c37](https://github.com/googleapis/java-binary-authorization/commit/b951c37239b55920bfd89dedb96af7b1397a4caa)) +* Update dependency jinja2 to v3.1.2 ([#288](https://github.com/googleapis/java-binary-authorization/issues/288)) ([ffd2347](https://github.com/googleapis/java-binary-authorization/commit/ffd2347ba6a157110d0c4925df8979840ffc7197)) +* Update dependency keyring to v23.9.3 ([#289](https://github.com/googleapis/java-binary-authorization/issues/289)) ([7078803](https://github.com/googleapis/java-binary-authorization/commit/7078803a0cde79de542d292574aac2677835bae2)) +* Update dependency markupsafe to v2.1.1 ([#290](https://github.com/googleapis/java-binary-authorization/issues/290)) ([5469e46](https://github.com/googleapis/java-binary-authorization/commit/5469e46df1ac140ca4d308eeb43bfb41d341a72a)) +* Update dependency protobuf to v3.20.2 ([#291](https://github.com/googleapis/java-binary-authorization/issues/291)) ([9644c7f](https://github.com/googleapis/java-binary-authorization/commit/9644c7f679a786aaea6686eaf219142003f1ea11)) +* Update dependency protobuf to v3.20.3 ([#300](https://github.com/googleapis/java-binary-authorization/issues/300)) ([a5b20f7](https://github.com/googleapis/java-binary-authorization/commit/a5b20f7364ccf3e4c91bd86efd55c4e5b6eb15c7)) +* Update dependency protobuf to v4 ([#297](https://github.com/googleapis/java-binary-authorization/issues/297)) ([bc3ba5f](https://github.com/googleapis/java-binary-authorization/commit/bc3ba5f176dec003fe555becd1bce6e2cc415c29)) +* Update dependency pyjwt to v2.5.0 ([#292](https://github.com/googleapis/java-binary-authorization/issues/292)) ([5716f17](https://github.com/googleapis/java-binary-authorization/commit/5716f177c2f26190ec9ca6c6ccd0a321a75b553d)) +* Update dependency requests to v2.28.1 ([#293](https://github.com/googleapis/java-binary-authorization/issues/293)) ([9212623](https://github.com/googleapis/java-binary-authorization/commit/92126233c88c5d993c9d1b1402f103c65c3cb2bd)) +* Update dependency typing-extensions to v4.3.0 ([#294](https://github.com/googleapis/java-binary-authorization/issues/294)) ([496eed2](https://github.com/googleapis/java-binary-authorization/commit/496eed218c7fa57b1007e9f4c3977ea04d2f2bde)) +* Update dependency zipp to v3.8.1 ([#295](https://github.com/googleapis/java-binary-authorization/issues/295)) ([43a78ce](https://github.com/googleapis/java-binary-authorization/commit/43a78ce22a83ec39cdeca08d73be79bfd00c28fc)) + ## [1.2.7](https://github.com/googleapis/java-binary-authorization/compare/v1.2.6...v1.2.7) (2022-09-20) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 2a6eda39..60ceb150 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.8-SNAPSHOT + 1.2.8 pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.8-SNAPSHOT + 1.2.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8
diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index f17d3bc6..e0bf5ea3 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.8-SNAPSHOT + 1.2.8 jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.8-SNAPSHOT + 1.2.8 google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 2cc05b72..9e9e3252 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8 grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8-SNAPSHOT + 1.2.8 diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 2cc53037..948c9855 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8-SNAPSHOT + 1.2.8 diff --git a/pom.xml b/pom.xml index 77de39f6..8895ed06 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.8-SNAPSHOT + 1.2.8 Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.8-SNAPSHOT + 1.2.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 1bb8a2fa..18ad3ec1 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8-SNAPSHOT + 1.2.8 proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8-SNAPSHOT + 1.2.8 diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 5d9fe5a9..1213d042 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8-SNAPSHOT + 0.7.8 proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8-SNAPSHOT + 1.2.8 diff --git a/versions.txt b/versions.txt index 7817fc90..975ced80 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.7:1.2.8-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.8-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.7:1.2.8-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.7:0.7.8-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.7:1.2.8-SNAPSHOT +google-cloud-binary-authorization:1.2.8:1.2.8 +grpc-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.8 +grpc-google-cloud-binary-authorization-v1:1.2.8:1.2.8 +proto-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.8 +proto-google-cloud-binary-authorization-v1:1.2.8:1.2.8 From 2f630bd136e59af8d95f4b6a02f5d828f67f1927 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Tue, 4 Oct 2022 23:52:13 +0000 Subject: [PATCH 196/203] chore(main): release 1.2.9-SNAPSHOT (#305) :robot: I have created a release *beep* *boop* --- ### Updating meta-information for bleeding-edge SNAPSHOT release. --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please). --- google-cloud-binary-authorization-bom/pom.xml | 12 ++++++------ google-cloud-binary-authorization/pom.xml | 4 ++-- grpc-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- pom.xml | 12 ++++++------ proto-google-cloud-binary-authorization-v1/pom.xml | 4 ++-- .../pom.xml | 4 ++-- versions.txt | 10 +++++----- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml index 60ceb150..4e334cf1 100644 --- a/google-cloud-binary-authorization-bom/pom.xml +++ b/google-cloud-binary-authorization-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization-bom - 1.2.8 + 1.2.9-SNAPSHOT pom com.google.cloud @@ -56,27 +56,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.8 + 1.2.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml index e0bf5ea3..2f6fadcc 100644 --- a/google-cloud-binary-authorization/pom.xml +++ b/google-cloud-binary-authorization/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-binary-authorization - 1.2.8 + 1.2.9-SNAPSHOT jar Google Binary Authorization https://github.com/googleapis/java-binary-authorization @@ -11,7 +11,7 @@ com.google.cloud google-cloud-binary-authorization-parent - 1.2.8 + 1.2.9-SNAPSHOT google-cloud-binary-authorization diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml index 9e9e3252..4ca8b2a2 100644 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT grpc-google-cloud-binary-authorization-v1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8 + 1.2.9-SNAPSHOT diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml index 948c9855..b7ad77b1 100644 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT grpc-google-cloud-binary-authorization-v1beta1 GRPC library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8 + 1.2.9-SNAPSHOT diff --git a/pom.xml b/pom.xml index 8895ed06..62a2c09c 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-binary-authorization-parent pom - 1.2.8 + 1.2.9-SNAPSHOT Google Binary Authorization Parent https://github.com/googleapis/java-binary-authorization @@ -60,27 +60,27 @@ com.google.cloud google-cloud-binary-authorization - 1.2.8 + 1.2.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT com.google.api.grpc grpc-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml index 18ad3ec1..f6008c2f 100644 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1 - 1.2.8 + 1.2.9-SNAPSHOT proto-google-cloud-binary-authorization-v1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8 + 1.2.9-SNAPSHOT diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml index 1213d042..8fad34da 100644 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ b/proto-google-cloud-binary-authorization-v1beta1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-binary-authorization-v1beta1 - 0.7.8 + 0.7.9-SNAPSHOT proto-google-cloud-binary-authorization-v1beta1 Proto library for google-cloud-binary-authorization com.google.cloud google-cloud-binary-authorization-parent - 1.2.8 + 1.2.9-SNAPSHOT diff --git a/versions.txt b/versions.txt index 975ced80..6a25ebd1 100644 --- a/versions.txt +++ b/versions.txt @@ -1,8 +1,8 @@ # Format: # module:released-version:current-version -google-cloud-binary-authorization:1.2.8:1.2.8 -grpc-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.8 -grpc-google-cloud-binary-authorization-v1:1.2.8:1.2.8 -proto-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.8 -proto-google-cloud-binary-authorization-v1:1.2.8:1.2.8 +google-cloud-binary-authorization:1.2.8:1.2.9-SNAPSHOT +grpc-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.9-SNAPSHOT +grpc-google-cloud-binary-authorization-v1:1.2.8:1.2.9-SNAPSHOT +proto-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.9-SNAPSHOT +proto-google-cloud-binary-authorization-v1:1.2.8:1.2.9-SNAPSHOT From 4c843794afb6b07feb67f19618d21ed44d92deee Mon Sep 17 00:00:00 2001 From: WhiteSource Renovate Date: Thu, 6 Oct 2022 05:16:19 +0200 Subject: [PATCH 197/203] deps: update dependency io.grafeas:grafeas to v2.4.7 (#304) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [io.grafeas:grafeas](https://togithub.com/googleapis/google-cloud-java/tree/master/google-cloud-clients/grafeas) ([source](https://togithub.com/googleapis/java-grafeas)) | `2.4.5` -> `2.4.7` | [![age](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.7/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.7/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.7/compatibility-slim/2.4.5)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/maven/io.grafeas:grafeas/2.4.7/confidence-slim/2.4.5)](https://docs.renovatebot.com/merge-confidence/) | --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, click this checkbox. ⚠ **Warning**: custom changes will be lost. --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/java-binary-authorization). --- README.md | 6 +++--- pom.xml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 003df9bb..26cc9963 100644 --- a/README.md +++ b/README.md @@ -19,20 +19,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.7 + 1.2.8 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.7' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.8' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.7" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.8" ``` ## Authentication diff --git a/pom.xml b/pom.xml index 62a2c09c..dd29d014 100644 --- a/pom.xml +++ b/pom.xml @@ -86,7 +86,7 @@ io.grafeas grafeas - 2.4.5 + 2.4.7 io.perfmark From 07605f8eb4504383efbd812aac63e0f99b4875dd Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 7 Nov 2022 21:42:14 +0000 Subject: [PATCH 198/203] chore(java): add a note in README for migrated split repos (#1687) (#324) * chore(java): add a note in README for migrated split repos Disable renovate bot and flaky bot for split repositories that have moved to the Java monorepo. The Java monorepo will pass the "monorepo=True" parameter to java.common_templates method in its owlbot.py files so that the migration note will not appear in the README in the monorepo. Co-authored-by: Jeff Ching Source-Link: https://togithub.com/googleapis/synthtool/commit/d4b291604f148cde065838c498bc8aa79b8dc10e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a --- .github/.OwlBot.lock.yaml | 2 +- .github/ISSUE_TEMPLATE/bug_report.md | 5 +++++ .github/ISSUE_TEMPLATE/feature_request.md | 5 +++++ .kokoro/nightly/integration.cfg | 2 +- .kokoro/nightly/java11-integration.cfg | 2 +- .kokoro/nightly/samples.cfg | 2 +- .kokoro/requirements.in | 2 ++ .kokoro/requirements.txt | 14 +++++++++----- README.md | 13 ++++++++++--- renovate.json | 1 + 10 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index dfd85d72..77cf6087 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:086f6916c24f11a1a196ea47f9da39abb4ca8730fcd6e69158fec4834287bcde + digest: sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f6398fb9..823d4ad9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -4,6 +4,11 @@ about: Create a report to help us improve --- +:bus: This library has moved to +[google-cloud-java/java-binary-authorization]( +https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization). +This repository will be archived in the future. + Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 754e30c6..076dfd21 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -4,6 +4,11 @@ about: Suggest an idea for this library --- +:bus: This library has moved to +[google-cloud-java/java-binary-authorization]( +https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization). +This repository will be archived in the future. + Thanks for stopping by to let us know something could be better! **PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg index a2907a25..bd0297a3 100644 --- a/.kokoro/nightly/integration.cfg +++ b/.kokoro/nightly/integration.cfg @@ -23,7 +23,7 @@ env_vars: { env_vars: { key: "ENABLE_FLAKYBOT" - value: "true" + value: "false" } env_vars: { diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg index 58049cc3..dc51b65e 100644 --- a/.kokoro/nightly/java11-integration.cfg +++ b/.kokoro/nightly/java11-integration.cfg @@ -23,7 +23,7 @@ env_vars: { env_vars: { key: "ENABLE_FLAKYBOT" - value: "true" + value: "false" } env_vars: { diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg index 9761fd86..fee6a838 100644 --- a/.kokoro/nightly/samples.cfg +++ b/.kokoro/nightly/samples.cfg @@ -34,5 +34,5 @@ env_vars: { env_vars: { key: "ENABLE_FLAKYBOT" - value: "true" + value: "false" } diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in index cfdc2e7e..6aa7cf2b 100644 --- a/.kokoro/requirements.in +++ b/.kokoro/requirements.in @@ -16,10 +16,12 @@ pycparser==2.21 pyperclip==1.8.2 python-dateutil==2.8.2 requests==2.27.1 +certifi==2022.9.24 importlib-metadata==4.8.3 zipp==3.6.0 google_api_core==2.8.2 google-cloud-storage==2.0.0 +google-resumable-media==2.3.3 google-cloud-core==2.3.1 typing-extensions==4.1.1 urllib3==1.26.12 diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 170f1c63..02ae42bb 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -16,10 +16,12 @@ cachetools==4.2.4 \ # via # -r requirements.in # google-auth -certifi==2022.9.14 \ - --hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \ - --hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516 - # via requests +certifi==2022.9.24 \ + --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ + --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 + # via + # -r requirements.in + # requests cffi==1.15.1 \ --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ @@ -218,7 +220,9 @@ google-crc32c==1.3.0 \ google-resumable-media==2.3.3 \ --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 - # via google-cloud-storage + # via + # -r requirements.in + # google-cloud-storage googleapis-common-protos==1.56.3 \ --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 diff --git a/README.md b/README.md index 26cc9963..e1864b2f 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,13 @@ Java idiomatic client for [Binary Authorization][product-docs]. - [Client Library Documentation][javadocs] +:bus: In October 2022, this library has moved to +[google-cloud-java/java-binary-authorization]( +https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization). +This repository will be archived in the future. +Future releases will appear in the new repository (https://github.com/googleapis/google-cloud-java/releases). +The Maven artifact coordinates (`com.google.cloud:google-cloud-binary-authorization`) remain the same. + ## Quickstart @@ -19,20 +26,20 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-binary-authorization - 1.2.8 + 1.4.0 ``` If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-binary-authorization:1.2.8' +implementation 'com.google.cloud:google-cloud-binary-authorization:1.4.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.2.8" +libraryDependencies += "com.google.cloud" % "google-cloud-binary-authorization" % "1.4.0" ``` ## Authentication diff --git a/renovate.json b/renovate.json index 424b539a..d2be2000 100644 --- a/renovate.json +++ b/renovate.json @@ -1,4 +1,5 @@ { + "enabled": false, "extends": [ ":separateMajorReleases", ":combinePatchMinorReleases", From 20347426c6a08c79f669d9c486132f9f820bd5f9 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Tue, 8 Nov 2022 17:16:27 +0000 Subject: [PATCH 199/203] chore: Set `rest_numeric_enums = False` for all gapic rules explicitly (#322) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 485623855 Source-Link: https://togithub.com/googleapis/googleapis/commit/807125e7953e32535710924fe4bf0362ac93754d Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/c4ddd6d651da69658a4762c5eafff5cd8f0e25c5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzRkZGQ2ZDY1MWRhNjk2NThhNDc2MmM1ZWFmZmY1Y2Q4ZjBlMjVjNSJ9 --- .../BinauthzManagementServiceV1Beta1Client.java | 6 +----- .../v1beta1/SystemPolicyV1Beta1Client.java | 5 +---- .../v1/BinauthzManagementServiceV1Client.java | 6 +----- .../binaryauthorization/v1/SystemPolicyV1Client.java | 5 +---- .../v1/ValidationHelperV1Client.java | 5 +---- .../create/SyncCreateSetCredentialsProvider.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider1.java | 10 +++------- .../create/SyncCreateSetEndpoint.java | 4 ++-- .../createattestor/AsyncCreateAttestor.java | 4 ++-- .../createattestor/SyncCreateAttestor.java | 4 ++-- .../SyncCreateAttestorProjectnameStringAttestor.java | 4 ++-- .../SyncCreateAttestorStringStringAttestor.java | 4 ++-- .../deleteattestor/AsyncDeleteAttestor.java | 4 ++-- .../deleteattestor/SyncDeleteAttestor.java | 4 ++-- .../deleteattestor/SyncDeleteAttestorAttestorname.java | 4 ++-- .../deleteattestor/SyncDeleteAttestorString.java | 4 ++-- .../getattestor/AsyncGetAttestor.java | 4 ++-- .../getattestor/SyncGetAttestor.java | 4 ++-- .../getattestor/SyncGetAttestorAttestorname.java | 4 ++-- .../getattestor/SyncGetAttestorString.java | 4 ++-- .../getpolicy/AsyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicyPolicyname.java | 4 ++-- .../getpolicy/SyncGetPolicyString.java | 4 ++-- .../listattestors/AsyncListAttestors.java | 4 ++-- .../listattestors/AsyncListAttestorsPaged.java | 4 ++-- .../listattestors/SyncListAttestors.java | 4 ++-- .../listattestors/SyncListAttestorsProjectname.java | 4 ++-- .../listattestors/SyncListAttestorsString.java | 4 ++-- .../updateattestor/AsyncUpdateAttestor.java | 4 ++-- .../updateattestor/SyncUpdateAttestor.java | 4 ++-- .../updateattestor/SyncUpdateAttestorAttestor.java | 4 ++-- .../updatepolicy/AsyncUpdatePolicy.java | 4 ++-- .../updatepolicy/SyncUpdatePolicy.java | 4 ++-- .../updatepolicy/SyncUpdatePolicyPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider1.java | 9 +++------ .../create/SyncCreateSetEndpoint.java | 4 ++-- .../getsystempolicy/AsyncGetSystemPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicyPolicyname.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicyString.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider1.java | 10 +++------- .../create/SyncCreateSetEndpoint.java | 4 ++-- .../createattestor/AsyncCreateAttestor.java | 4 ++-- .../createattestor/SyncCreateAttestor.java | 4 ++-- ...eateAttestorProjectnameStringResourcesattestor.java | 4 ++-- ...yncCreateAttestorStringStringResourcesattestor.java | 4 ++-- .../deleteattestor/AsyncDeleteAttestor.java | 4 ++-- .../deleteattestor/SyncDeleteAttestor.java | 4 ++-- .../deleteattestor/SyncDeleteAttestorAttestorname.java | 4 ++-- .../deleteattestor/SyncDeleteAttestorString.java | 4 ++-- .../getattestor/AsyncGetAttestor.java | 4 ++-- .../getattestor/SyncGetAttestor.java | 4 ++-- .../getattestor/SyncGetAttestorAttestorname.java | 4 ++-- .../getattestor/SyncGetAttestorString.java | 4 ++-- .../getpolicy/AsyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicyPolicyname.java | 4 ++-- .../getpolicy/SyncGetPolicyString.java | 4 ++-- .../listattestors/AsyncListAttestors.java | 4 ++-- .../listattestors/AsyncListAttestorsPaged.java | 4 ++-- .../listattestors/SyncListAttestors.java | 4 ++-- .../listattestors/SyncListAttestorsProjectname.java | 4 ++-- .../listattestors/SyncListAttestorsString.java | 4 ++-- .../updateattestor/AsyncUpdateAttestor.java | 4 ++-- .../updateattestor/SyncUpdateAttestor.java | 4 ++-- .../SyncUpdateAttestorResourcesattestor.java | 4 ++-- .../updatepolicy/AsyncUpdatePolicy.java | 4 ++-- .../updatepolicy/SyncUpdatePolicy.java | 4 ++-- .../updatepolicy/SyncUpdatePolicyResourcespolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getpolicy/SyncGetPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../SyncValidateAttestationOccurrence.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider1.java | 9 +++------ .../create/SyncCreateSetEndpoint.java | 4 ++-- .../getsystempolicy/AsyncGetSystemPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicyPolicyname.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicyString.java | 4 ++-- .../getsystempolicy/SyncGetSystemPolicy.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider.java | 4 ++-- .../create/SyncCreateSetCredentialsProvider1.java | 9 +++------ .../create/SyncCreateSetEndpoint.java | 4 ++-- .../AsyncValidateAttestationOccurrence.java | 4 ++-- .../SyncValidateAttestationOccurrence.java | 4 ++-- .../SyncValidateAttestationOccurrence.java | 4 ++-- 94 files changed, 188 insertions(+), 222 deletions(-) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/create/SyncCreateSetCredentialsProvider.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/create/SyncCreateSetCredentialsProvider1.java (77%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/create/SyncCreateSetEndpoint.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/createattestor/AsyncCreateAttestor.java (91%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/createattestor/SyncCreateAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/createattestor/SyncCreateAttestorProjectnameStringAttestor.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/createattestor/SyncCreateAttestorStringStringAttestor.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/deleteattestor/AsyncDeleteAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/deleteattestor/SyncDeleteAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/deleteattestor/SyncDeleteAttestorAttestorname.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/deleteattestor/SyncDeleteAttestorString.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getattestor/AsyncGetAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getattestor/SyncGetAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getattestor/SyncGetAttestorAttestorname.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getattestor/SyncGetAttestorString.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getpolicy/AsyncGetPolicy.java (91%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getpolicy/SyncGetPolicy.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getpolicy/SyncGetPolicyPolicyname.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/getpolicy/SyncGetPolicyString.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/listattestors/AsyncListAttestors.java (91%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/listattestors/AsyncListAttestorsPaged.java (92%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/listattestors/SyncListAttestors.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/listattestors/SyncListAttestorsProjectname.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/listattestors/SyncListAttestorsString.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updateattestor/AsyncUpdateAttestor.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updateattestor/SyncUpdateAttestor.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updateattestor/SyncUpdateAttestorAttestor.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updatepolicy/AsyncUpdatePolicy.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updatepolicy/SyncUpdatePolicy.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{binauthzmanagementservicev1beta1client => binauthzmanagementservicev1beta1}/updatepolicy/SyncUpdatePolicyPolicy.java (88%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/create/SyncCreateSetCredentialsProvider.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/create/SyncCreateSetCredentialsProvider1.java (79%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/create/SyncCreateSetEndpoint.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/getsystempolicy/AsyncGetSystemPolicy.java (91%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/getsystempolicy/SyncGetSystemPolicy.java (90%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/getsystempolicy/SyncGetSystemPolicyPolicyname.java (89%) rename samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/{systempolicyv1beta1client => systempolicyv1beta1}/getsystempolicy/SyncGetSystemPolicyString.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/create/SyncCreateSetCredentialsProvider.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/create/SyncCreateSetCredentialsProvider1.java (78%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/create/SyncCreateSetEndpoint.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/createattestor/AsyncCreateAttestor.java (92%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/createattestor/SyncCreateAttestor.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java (88%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/createattestor/SyncCreateAttestorStringStringResourcesattestor.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/deleteattestor/AsyncDeleteAttestor.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/deleteattestor/SyncDeleteAttestor.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/deleteattestor/SyncDeleteAttestorAttestorname.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/deleteattestor/SyncDeleteAttestorString.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getattestor/AsyncGetAttestor.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getattestor/SyncGetAttestor.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getattestor/SyncGetAttestorAttestorname.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getattestor/SyncGetAttestorString.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getpolicy/AsyncGetPolicy.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getpolicy/SyncGetPolicy.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getpolicy/SyncGetPolicyPolicyname.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/getpolicy/SyncGetPolicyString.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/listattestors/AsyncListAttestors.java (92%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/listattestors/AsyncListAttestorsPaged.java (92%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/listattestors/SyncListAttestors.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/listattestors/SyncListAttestorsProjectname.java (89%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/listattestors/SyncListAttestorsString.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updateattestor/AsyncUpdateAttestor.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updateattestor/SyncUpdateAttestor.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updateattestor/SyncUpdateAttestorResourcesattestor.java (88%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updatepolicy/AsyncUpdatePolicy.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updatepolicy/SyncUpdatePolicy.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{binauthzmanagementservicev1client => binauthzmanagementservicev1}/updatepolicy/SyncUpdatePolicyResourcespolicy.java (88%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/create/SyncCreateSetCredentialsProvider.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/create/SyncCreateSetCredentialsProvider1.java (80%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/create/SyncCreateSetEndpoint.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/getsystempolicy/AsyncGetSystemPolicy.java (92%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/getsystempolicy/SyncGetSystemPolicy.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/getsystempolicy/SyncGetSystemPolicyPolicyname.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{systempolicyv1client => systempolicyv1}/getsystempolicy/SyncGetSystemPolicyString.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{validationhelperv1client => validationhelperv1}/create/SyncCreateSetCredentialsProvider.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{validationhelperv1client => validationhelperv1}/create/SyncCreateSetCredentialsProvider1.java (80%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{validationhelperv1client => validationhelperv1}/create/SyncCreateSetEndpoint.java (90%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{validationhelperv1client => validationhelperv1}/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java (91%) rename samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/{validationhelperv1client => validationhelperv1}/validateattestationoccurrence/SyncValidateAttestationOccurrence.java (91%) diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java index ac731ce0..11c203f6 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java @@ -129,11 +129,7 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - * BinauthzManagementServiceV1Beta1Settings.newBuilder() - * .setTransportChannelProvider( - * BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() - * .build()) - * .build(); + * BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder().build(); * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = * BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); * }
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java index 2ee56b43..3455dfc5 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java @@ -111,10 +111,7 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - * SystemPolicyV1Beta1Settings.newBuilder() - * .setTransportChannelProvider( - * SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder().build()) - * .build(); + * SystemPolicyV1Beta1Settings.newHttpJsonBuilder().build(); * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = * SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); * }
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java index f1e5de92..34a46d9c 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java @@ -128,11 +128,7 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - * BinauthzManagementServiceV1Settings.newBuilder() - * .setTransportChannelProvider( - * BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder() - * .build()) - * .build(); + * BinauthzManagementServiceV1Settings.newHttpJsonBuilder().build(); * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = * BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); * }
diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java index 68fd8cec..a5f90d41 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java @@ -107,10 +107,7 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * SystemPolicyV1Settings systemPolicyV1Settings = - * SystemPolicyV1Settings.newBuilder() - * .setTransportChannelProvider( - * SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder().build()) - * .build(); + * SystemPolicyV1Settings.newHttpJsonBuilder().build(); * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); * }
* diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java index a1d35f21..dd48a8ae 100644 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java +++ b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java @@ -117,10 +117,7 @@ * // - It may require specifying regional endpoints when creating the service client as shown in * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library * ValidationHelperV1Settings validationHelperV1Settings = - * ValidationHelperV1Settings.newBuilder() - * .setTransportChannelProvider( - * ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder().build()) - * .build(); + * ValidationHelperV1Settings.newHttpJsonBuilder().build(); * ValidationHelperV1Client validationHelperV1Client = * ValidationHelperV1Client.create(validationHelperV1Settings); * }
diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java index 3bcd4999..38181a55 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; @@ -42,4 +42,4 @@ public static void syncCreateSetCredentialsProvider() throws Exception { BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java similarity index 77% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java index 26bcfb6a..5f9d66a3 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider1_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider1_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; @@ -33,13 +33,9 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - BinauthzManagementServiceV1Beta1Settings.newBuilder() - .setTransportChannelProvider( - BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() - .build()) - .build(); + BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder().build(); BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setcredentialsprovider1_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java index 295c4ebc..e46077c6 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setendpoint_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetEndpoint_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; @@ -39,4 +39,4 @@ public static void syncCreateSetEndpoint() throws Exception { BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_create_setendpoint_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java index 1ab1bc49..6200c211 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/AsyncCreateAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -50,4 +50,4 @@ public static void asyncCreateAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java index 401f4858..a16a9acb 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; @@ -46,4 +46,4 @@ public static void syncCreateAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java index b3a18757..297616a6 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorProjectnameStringAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_projectnamestringattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_ProjectnameStringAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ProjectName; @@ -43,4 +43,4 @@ public static void syncCreateAttestorProjectnameStringAttestor() throws Exceptio } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_projectnamestringattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_ProjectnameStringAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java index 4ef69a5b..328d1738 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/createattestor/SyncCreateAttestorStringStringAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_stringstringattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_StringStringAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ProjectName; @@ -43,4 +43,4 @@ public static void syncCreateAttestorStringStringAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_createattestor_stringstringattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_StringStringAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java index bf3bb616..50ae3564 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/AsyncDeleteAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -48,4 +48,4 @@ public static void asyncDeleteAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java index c6c209f3..1480e2ef 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; @@ -44,4 +44,4 @@ public static void syncDeleteAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java index d66a2f89..2b19e5cc 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorAttestorname.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_attestorname_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_Attestorname_sync] import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.protobuf.Empty; @@ -40,4 +40,4 @@ public static void syncDeleteAttestorAttestorname() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_attestorname_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java index 2b59e103..6c5fbb8d 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/deleteattestor/SyncDeleteAttestorString.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_string_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_String_sync] import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.protobuf.Empty; @@ -40,4 +40,4 @@ public static void syncDeleteAttestorString() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_deleteattestor_string_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java index e297ddc9..55c881a4 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/AsyncGetAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.AttestorName; @@ -48,4 +48,4 @@ public static void asyncGetAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java index 4affd033..cd678429 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -44,4 +44,4 @@ public static void syncGetAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java index ce5409ec..38757d7a 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorAttestorname.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_attestorname_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_Attestorname_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -40,4 +40,4 @@ public static void syncGetAttestorAttestorname() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_attestorname_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java index 6c3721ab..afbd0001 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getattestor/SyncGetAttestorString.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_string_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_String_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.AttestorName; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -40,4 +40,4 @@ public static void syncGetAttestorString() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getattestor_string_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java similarity index 91% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java index f75844b9..7d392153 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/AsyncGetPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; @@ -48,4 +48,4 @@ public static void asyncGetPolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java index 8220c9ba..d6090732 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; import com.google.cloud.binaryauthorization.v1beta1.Policy; @@ -44,4 +44,4 @@ public static void syncGetPolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java index 5705ab31..469346b7 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyPolicyname.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_policyname_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_Policyname_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.PolicyName; @@ -40,4 +40,4 @@ public static void syncGetPolicyPolicyname() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_policyname_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java index c541bd4c..f1544dfc 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/getpolicy/SyncGetPolicyString.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_string_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_String_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.PolicyName; @@ -40,4 +40,4 @@ public static void syncGetPolicyString() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_getpolicy_string_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java similarity index 91% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java index 392dc680..12d84ed5 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestors.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -52,4 +52,4 @@ public static void asyncListAttestors() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java similarity index 92% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java index a4f23ee1..d5fd2d1e 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/AsyncListAttestorsPaged.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_paged_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Paged_async] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; @@ -60,4 +60,4 @@ public static void asyncListAttestorsPaged() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_paged_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Paged_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java index cb6ce6fe..d7342eb0 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestors.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; @@ -49,4 +49,4 @@ public static void syncListAttestors() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java index 7c640d20..ee0e8357 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsProjectname.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_projectname_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Projectname_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ProjectName; @@ -43,4 +43,4 @@ public static void syncListAttestorsProjectname() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_projectname_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Projectname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java index b379e5ee..25881d27 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/listattestors/SyncListAttestorsString.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_string_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_String_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.ProjectName; @@ -43,4 +43,4 @@ public static void syncListAttestorsString() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_listattestors_string_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java index 23b3a450..844fd445 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/AsyncUpdateAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -45,4 +45,4 @@ public static void asyncUpdateAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java index 8d96f843..bede9814 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; @@ -41,4 +41,4 @@ public static void syncUpdateAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java index e80285fa..0be6fb65 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updateattestor/SyncUpdateAttestorAttestor.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_attestor_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_Attestor_sync] import com.google.cloud.binaryauthorization.v1beta1.Attestor; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; @@ -39,4 +39,4 @@ public static void syncUpdateAttestorAttestor() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updateattestor_attestor_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_Attestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java index eb99854e..4256c2d5 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/AsyncUpdatePolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_async] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.Policy; @@ -45,4 +45,4 @@ public static void asyncUpdatePolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_async] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java index cafc3fc7..bae84c8f 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; @@ -41,4 +41,4 @@ public static void syncUpdatePolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java similarity index 88% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java index 805719bd..05b8ed92 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1client/updatepolicy/SyncUpdatePolicyPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_policy_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_Policy_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.Policy; @@ -39,4 +39,4 @@ public static void syncUpdatePolicyPolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1client_updatepolicy_policy_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_Policy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java index 922fe028..af9e6ed0 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1settings_getpolicy_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1Settings_GetPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; import java.time.Duration; @@ -48,4 +48,4 @@ public static void syncGetPolicy() throws Exception { binauthzManagementServiceV1Beta1SettingsBuilder.build(); } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1settings_getpolicy_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1Settings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java index 63550e47..cfc5f0a6 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.stub.samples; -// [START binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1stubsettings_getpolicy_sync] +// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1StubSettings_GetPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1StubSettings; import java.time.Duration; @@ -48,4 +48,4 @@ public static void syncGetPolicy() throws Exception { binauthzManagementServiceV1Beta1SettingsBuilder.build(); } } -// [END binaryauthorization_v1beta1_generated_binauthzmanagementservicev1beta1stubsettings_getpolicy_sync] +// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1StubSettings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java index c1ad723d..a0df404e 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.stub.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1stubsettings_getsystempolicy_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1StubSettings_GetSystemPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncGetSystemPolicy() throws Exception { systemPolicyV1Beta1SettingsBuilder.build(); } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1stubsettings_getsystempolicy_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1StubSettings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java index 00f2fd48..6ddb2102 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; @@ -42,4 +42,4 @@ public static void syncCreateSetCredentialsProvider() throws Exception { SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java similarity index 79% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java index cb200f8b..711d0c90 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider1_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider1_sync] import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; @@ -33,12 +33,9 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - SystemPolicyV1Beta1Settings.newBuilder() - .setTransportChannelProvider( - SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); + SystemPolicyV1Beta1Settings.newHttpJsonBuilder().build(); SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setcredentialsprovider1_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java index 7c7e7ab4..68f69659 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setendpoint_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetEndpoint_sync] import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; @@ -39,4 +39,4 @@ public static void syncCreateSetEndpoint() throws Exception { SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_create_setendpoint_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java similarity index 91% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java index d2a196d3..856bc75f 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/AsyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_async] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_async] import com.google.api.core.ApiFuture; import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; import com.google.cloud.binaryauthorization.v1beta1.Policy; @@ -47,4 +47,4 @@ public static void asyncGetSystemPolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_async] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java similarity index 90% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java index 9eed94b9..2b02b333 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.PolicyName; @@ -43,4 +43,4 @@ public static void syncGetSystemPolicy() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java index 1ee83432..15ae732f 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_policyname_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_Policyname_sync] import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.PolicyName; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; @@ -39,4 +39,4 @@ public static void syncGetSystemPolicyPolicyname() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_policyname_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java similarity index 89% rename from samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java rename to samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java index a571ccfd..58a26eda 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1client/getsystempolicy/SyncGetSystemPolicyString.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_string_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_String_sync] import com.google.cloud.binaryauthorization.v1beta1.Policy; import com.google.cloud.binaryauthorization.v1beta1.PolicyName; import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; @@ -39,4 +39,4 @@ public static void syncGetSystemPolicyString() throws Exception { } } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1client_getsystempolicy_string_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java index b33a2d8c..b58d5fc3 100644 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.cloud.binaryauthorization.v1beta1.samples; -// [START binaryauthorization_v1beta1_generated_systempolicyv1beta1settings_getsystempolicy_sync] +// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1Settings_GetSystemPolicy_sync] import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncGetSystemPolicy() throws Exception { systemPolicyV1Beta1SettingsBuilder.build(); } } -// [END binaryauthorization_v1beta1_generated_systempolicyv1beta1settings_getsystempolicy_sync] +// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1Settings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java index 4c8ea7aa..f08b8239 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; @@ -42,4 +42,4 @@ public static void syncCreateSetCredentialsProvider() throws Exception { BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java similarity index 78% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java index 1577b979..06e4d867 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider1_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider1_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; @@ -33,13 +33,9 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - BinauthzManagementServiceV1Settings.newBuilder() - .setTransportChannelProvider( - BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder() - .build()) - .build(); + BinauthzManagementServiceV1Settings.newHttpJsonBuilder().build(); BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setcredentialsprovider1_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java index 420a93c7..aebe3f68 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setendpoint_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetEndpoint_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; @@ -39,4 +39,4 @@ public static void syncCreateSetEndpoint() throws Exception { BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_create_setendpoint_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java similarity index 92% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java index f06ee7fb..50bc5df9 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/AsyncCreateAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; @@ -50,4 +50,4 @@ public static void asyncCreateAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java index 7fcbc689..7a9efc65 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -46,4 +46,4 @@ public static void syncCreateAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java similarity index 88% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java index ccccccd6..7d2ec679 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_projectnamestringresourcesattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_ProjectnameStringResourcesattestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -43,4 +43,4 @@ public static void syncCreateAttestorProjectnameStringResourcesattestor() throws } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_projectnamestringresourcesattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_ProjectnameStringResourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java index fad591c5..4a2bf443 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/createattestor/SyncCreateAttestorStringStringResourcesattestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_stringstringresourcesattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_StringStringResourcesattestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -43,4 +43,4 @@ public static void syncCreateAttestorStringStringResourcesattestor() throws Exce } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_createattestor_stringstringresourcesattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_StringStringResourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java index cff4fd6b..11eaffca 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/AsyncDeleteAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_async] import com.google.api.core.ApiFuture; import com.google.protobuf.Empty; import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; @@ -48,4 +48,4 @@ public static void asyncDeleteAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java index 1f0a191b..4bd2c700 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] import com.google.protobuf.Empty; import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; @@ -44,4 +44,4 @@ public static void syncDeleteAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java index c0484c0c..acd49996 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorAttestorname.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_attestorname_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_Attestorname_sync] import com.google.protobuf.Empty; import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; @@ -40,4 +40,4 @@ public static void syncDeleteAttestorAttestorname() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_attestorname_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java index 747e929a..07de40a5 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/deleteattestor/SyncDeleteAttestorString.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_string_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_String_sync] import com.google.protobuf.Empty; import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; @@ -40,4 +40,4 @@ public static void syncDeleteAttestorString() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_deleteattestor_string_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java index 083788a7..bb9844d0 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/AsyncGetAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; @@ -48,4 +48,4 @@ public static void asyncGetAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java index 272dda3a..24f19e8b 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -44,4 +44,4 @@ public static void syncGetAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java index bf3c8364..65f46ba2 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorAttestorname.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_attestorname_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_Attestorname_sync] import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -40,4 +40,4 @@ public static void syncGetAttestorAttestorname() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_attestorname_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java index d205855e..8ae022d8 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getattestor/SyncGetAttestorString.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_string_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_String_sync] import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -40,4 +40,4 @@ public static void syncGetAttestorString() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getattestor_string_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java index 29fa43a6..44d0a329 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/AsyncGetPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; @@ -48,4 +48,4 @@ public static void asyncGetPolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java index 1b031f3c..036fde5c 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -44,4 +44,4 @@ public static void syncGetPolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java index 6dc419b2..e4ee10e4 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyPolicyname.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_policyname_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_Policyname_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -40,4 +40,4 @@ public static void syncGetPolicyPolicyname() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_policyname_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java index 4eb68650..357e926f 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/getpolicy/SyncGetPolicyString.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_string_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_String_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -40,4 +40,4 @@ public static void syncGetPolicyString() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_getpolicy_string_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java similarity index 92% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java index 799ffae4..fa974543 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestors.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; @@ -52,4 +52,4 @@ public static void asyncListAttestors() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java similarity index 92% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java index 1e4027b3..301ae780 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/AsyncListAttestorsPaged.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_paged_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Paged_async] import com.google.common.base.Strings; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; @@ -59,4 +59,4 @@ public static void asyncListAttestorsPaged() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_paged_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Paged_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java index 54b2f6e5..93f38556 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestors.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -49,4 +49,4 @@ public static void syncListAttestors() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java similarity index 89% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java index a4358095..97c68a56 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsProjectname.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_projectname_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Projectname_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -43,4 +43,4 @@ public static void syncListAttestorsProjectname() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_projectname_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Projectname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java index 8d1d8f03..7d55fcae 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/listattestors/SyncListAttestorsString.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_string_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_String_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -43,4 +43,4 @@ public static void syncListAttestorsString() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_listattestors_string_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java index cc7e5e3f..eaeb9110 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/AsyncUpdateAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -47,4 +47,4 @@ public static void asyncUpdateAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java index 9f01816e..513a3f3e 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; import com.google.protos.google.cloud.binaryauthorization.v1.Service; @@ -43,4 +43,4 @@ public static void syncUpdateAttestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java similarity index 88% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java index 3e133dec..328ae2dc 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updateattestor/SyncUpdateAttestorResourcesattestor.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_resourcesattestor_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_Resourcesattestor_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -39,4 +39,4 @@ public static void syncUpdateAttestorResourcesattestor() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updateattestor_resourcesattestor_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_Resourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java index 7197481f..02d0f720 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/AsyncUpdatePolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_async] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -47,4 +47,4 @@ public static void asyncUpdatePolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_async] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java index 342f3b23..98d854b0 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; import com.google.protos.google.cloud.binaryauthorization.v1.Service; @@ -43,4 +43,4 @@ public static void syncUpdatePolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java similarity index 88% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java index 05d9eaef..5023977c 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1client/updatepolicy/SyncUpdatePolicyResourcespolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_resourcespolicy_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_Resourcespolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -39,4 +39,4 @@ public static void syncUpdatePolicyResourcespolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1client_updatepolicy_resourcespolicy_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_Resourcespolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java index 7155ab0b..00e0eb40 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1settings_getpolicy_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1Settings_GetPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncGetPolicy() throws Exception { binauthzManagementServiceV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1settings_getpolicy_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1Settings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java index 0c8f3f47..4a67ce5b 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.stub.samples; -// [START binaryauthorization_v1_generated_binauthzmanagementservicev1stubsettings_getpolicy_sync] +// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1StubSettings_GetPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncGetPolicy() throws Exception { binauthzManagementServiceV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_binauthzmanagementservicev1stubsettings_getpolicy_sync] +// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1StubSettings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java index 1f8cc38d..241ecdda 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.stub.samples; -// [START binaryauthorization_v1_generated_systempolicyv1stubsettings_getsystempolicy_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1StubSettings_GetSystemPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; import java.time.Duration; @@ -43,4 +43,4 @@ public static void syncGetSystemPolicy() throws Exception { SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_systempolicyv1stubsettings_getsystempolicy_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1StubSettings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java index 0ce560a2..adfbe2d2 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.stub.samples; -// [START binaryauthorization_v1_generated_validationhelperv1stubsettings_validateattestationoccurrence_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1StubSettings_ValidateAttestationOccurrence_sync] import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncValidateAttestationOccurrence() throws Exception { validationHelperV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_validationhelperv1stubsettings_validateattestationoccurrence_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1StubSettings_ValidateAttestationOccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java index 0a97b7f7..7ff7d792 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; @@ -41,4 +41,4 @@ public static void syncCreateSetCredentialsProvider() throws Exception { SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); } } -// [END binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java similarity index 80% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java index b118275d..eaac0879 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider1_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider1_sync] import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; @@ -33,11 +33,8 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library SystemPolicyV1Settings systemPolicyV1Settings = - SystemPolicyV1Settings.newBuilder() - .setTransportChannelProvider( - SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); + SystemPolicyV1Settings.newHttpJsonBuilder().build(); SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); } } -// [END binaryauthorization_v1_generated_systempolicyv1client_create_setcredentialsprovider1_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java index 75e502e6..16206d60 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_create_setendpoint_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetEndpoint_sync] import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; @@ -38,4 +38,4 @@ public static void syncCreateSetEndpoint() throws Exception { SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); } } -// [END binaryauthorization_v1_generated_systempolicyv1client_create_setendpoint_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java similarity index 92% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java index 04dfc7ca..d8e2acfd 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/AsyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_async] +// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; @@ -47,4 +47,4 @@ public static void asyncGetSystemPolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_async] +// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java index 05bed11c..b75ad78b 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; import com.google.protos.google.cloud.binaryauthorization.v1.Service; @@ -43,4 +43,4 @@ public static void syncGetSystemPolicy() throws Exception { } } } -// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java index ed7f8a2f..2ad4e312 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyPolicyname.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_policyname_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_Policyname_sync] import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; @@ -39,4 +39,4 @@ public static void syncGetSystemPolicyPolicyname() throws Exception { } } } -// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_policyname_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java index c1c65ba8..f48e47c3 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1client/getsystempolicy/SyncGetSystemPolicyString.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_string_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_String_sync] import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; import com.google.protos.google.cloud.binaryauthorization.v1.Resources; import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; @@ -39,4 +39,4 @@ public static void syncGetSystemPolicyString() throws Exception { } } } -// [END binaryauthorization_v1_generated_systempolicyv1client_getsystempolicy_string_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java index 85a1adce..0a2e5012 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_systempolicyv1settings_getsystempolicy_sync] +// [START binaryauthorization_v1_generated_SystemPolicyV1Settings_GetSystemPolicy_sync] import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; import java.time.Duration; @@ -43,4 +43,4 @@ public static void syncGetSystemPolicy() throws Exception { SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_systempolicyv1settings_getsystempolicy_sync] +// [END binaryauthorization_v1_generated_SystemPolicyV1Settings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java index f15953ad..d2f05371 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider_sync] import com.google.api.gax.core.FixedCredentialsProvider; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; @@ -42,4 +42,4 @@ public static void syncCreateSetCredentialsProvider() throws Exception { ValidationHelperV1Client.create(validationHelperV1Settings); } } -// [END binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java similarity index 80% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java index 01c63f5d..a663fa29 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetCredentialsProvider1.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider1_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider1_sync] import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; @@ -33,12 +33,9 @@ public static void syncCreateSetCredentialsProvider1() throws Exception { // - It may require specifying regional endpoints when creating the service client as shown in // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library ValidationHelperV1Settings validationHelperV1Settings = - ValidationHelperV1Settings.newBuilder() - .setTransportChannelProvider( - ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder().build()) - .build(); + ValidationHelperV1Settings.newHttpJsonBuilder().build(); ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create(validationHelperV1Settings); } } -// [END binaryauthorization_v1_generated_validationhelperv1client_create_setcredentialsprovider1_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java similarity index 90% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java index c1407926..e222b0db 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/create/SyncCreateSetEndpoint.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1client_create_setendpoint_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetEndpoint_sync] import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; @@ -39,4 +39,4 @@ public static void syncCreateSetEndpoint() throws Exception { ValidationHelperV1Client.create(validationHelperV1Settings); } } -// [END binaryauthorization_v1_generated_validationhelperv1client_create_setendpoint_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java index c49fdf50..ddca0ba6 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_async] +// [START binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_async] import com.google.api.core.ApiFuture; import com.google.protos.google.cloud.binaryauthorization.v1.Service; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; @@ -49,4 +49,4 @@ public static void asyncValidateAttestationOccurrence() throws Exception { } } } -// [END binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_async] +// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java similarity index 91% rename from samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java rename to samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java index c725427c..75c81f4a 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1client/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] import com.google.protos.google.cloud.binaryauthorization.v1.Service; import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; import io.grafeas.v1.AttestationOccurrence; @@ -46,4 +46,4 @@ public static void syncValidateAttestationOccurrence() throws Exception { } } } -// [END binaryauthorization_v1_generated_validationhelperv1client_validateattestationoccurrence_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java index 6a926b07..399c3914 100644 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java @@ -16,7 +16,7 @@ package com.google.protos.google.cloud.binaryauthorization.v1.samples; -// [START binaryauthorization_v1_generated_validationhelperv1settings_validateattestationoccurrence_sync] +// [START binaryauthorization_v1_generated_ValidationHelperV1Settings_ValidateAttestationOccurrence_sync] import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; import java.time.Duration; @@ -47,4 +47,4 @@ public static void syncValidateAttestationOccurrence() throws Exception { validationHelperV1SettingsBuilder.build(); } } -// [END binaryauthorization_v1_generated_validationhelperv1settings_validateattestationoccurrence_sync] +// [END binaryauthorization_v1_generated_ValidationHelperV1Settings_ValidateAttestationOccurrence_sync] From fa02360e062cc4053d2c70168af9458e9bf7af39 Mon Sep 17 00:00:00 2001 From: Deepankar Dixit <90280028+ddixit14@users.noreply.github.com> Date: Thu, 23 Mar 2023 13:51:24 -0400 Subject: [PATCH 200/203] chore: Disabling owlbot (#342) --- .github/.OwlBot.lock.yaml | 16 ---------------- .github/.OwlBot.yaml | 32 -------------------------------- owlbot.py | 26 -------------------------- 3 files changed, 74 deletions(-) delete mode 100644 .github/.OwlBot.lock.yaml delete mode 100644 .github/.OwlBot.yaml delete mode 100644 owlbot.py diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml deleted file mode 100644 index 77cf6087..00000000 --- a/.github/.OwlBot.lock.yaml +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:edae91ccdd2dded2f572ec341a768ad180305a3e8fbfd93064b28e237d35920a diff --git a/.github/.OwlBot.yaml b/.github/.OwlBot.yaml deleted file mode 100644 index 34ce36f5..00000000 --- a/.github/.OwlBot.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# 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/cloud-devrel-public-resources/owlbot-java:latest" - -deep-remove-regex: -- "/samples/snippets/generated" -- "/grpc-google-.*/src" -- "/proto-google-.*/src" -- "/google-.*/src" - -deep-copy-regex: -- source: "/google/cloud/binaryauthorization/(v.*)/.*-java/proto-google-.*/src" - dest: "/owl-bot-staging/$1/proto-google-cloud-binary-authorization-$1/src" -- source: "/google/cloud/binaryauthorization/(v.*)/.*-java/grpc-google-.*/src" - dest: "/owl-bot-staging/$1/grpc-google-cloud-binary-authorization-$1/src" -- source: "/google/cloud/binaryauthorization/(v.*)/.*-java/gapic-google-.*/src" - dest: "/owl-bot-staging/$1/google-cloud-binary-authorization/src" -- source: "/google/cloud/binaryauthorization/(v.*)/.*-java/samples/snippets/generated" - dest: "/owl-bot-staging/$1/samples/snippets/generated" diff --git a/owlbot.py b/owlbot.py deleted file mode 100644 index 27106a3c..00000000 --- a/owlbot.py +++ /dev/null @@ -1,26 +0,0 @@ -# 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=[ - '.kokoro/dependencies.sh', - ]) \ No newline at end of file From 29dbbbf2ce38e07b141c3a963e9b276b43321368 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Wed, 31 May 2023 11:57:17 -0700 Subject: [PATCH 201/203] build: enable multiScm for releases (#344) --- .github/release-trigger.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/release-trigger.yml b/.github/release-trigger.yml index d4ca9418..15010af9 100644 --- a/.github/release-trigger.yml +++ b/.github/release-trigger.yml @@ -1 +1,2 @@ enabled: true +multiScmName: java-binary-authorization From 9b7232667fe740c4104d955e2d37e4be576c9467 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 5 Jul 2023 14:34:17 -0400 Subject: [PATCH 202/203] chore: removing outdated files in favor of https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization (#346) --- .github/CODEOWNERS | 15 - .github/ISSUE_TEMPLATE/bug_report.md | 56 - .github/ISSUE_TEMPLATE/feature_request.md | 26 - .github/ISSUE_TEMPLATE/support_request.md | 7 - .github/PULL_REQUEST_TEMPLATE.md | 10 - .github/auto-label.yaml | 15 - .github/blunderbuss.yml | 7 - .github/generated-files-bot.yml | 12 - .github/snippet-bot.yml | 0 .github/sync-repo-settings.yaml | 42 - .github/trusted-contribution.yml | 3 - .github/workflows/approve-readme.yaml | 69 - .github/workflows/auto-release.yaml | 103 - .github/workflows/ci.yaml | 89 - .github/workflows/samples.yaml | 30 - .gitignore | 17 - .kokoro/build.bat | 18 - .kokoro/build.sh | 134 - .kokoro/coerce_logs.sh | 37 - .kokoro/common.cfg | 13 - .kokoro/common.sh | 60 - .kokoro/continuous/common.cfg | 25 - .kokoro/continuous/java8.cfg | 12 - .kokoro/dependencies.sh | 110 - .kokoro/nightly/common.cfg | 25 - .kokoro/nightly/integration.cfg | 37 - .kokoro/nightly/java11-integration.cfg | 37 - .kokoro/nightly/java11.cfg | 7 - .kokoro/nightly/java7.cfg | 7 - .kokoro/nightly/java8-osx.cfg | 3 - .kokoro/nightly/java8-win.cfg | 3 - .kokoro/nightly/java8.cfg | 12 - .kokoro/nightly/samples.cfg | 38 - .kokoro/populate-secrets.sh | 43 - .kokoro/presubmit/clirr.cfg | 13 - .kokoro/presubmit/common.cfg | 34 - .kokoro/presubmit/dependencies.cfg | 12 - .kokoro/presubmit/graalvm-native-17.cfg | 33 - .kokoro/presubmit/graalvm-native.cfg | 33 - .kokoro/presubmit/integration.cfg | 33 - .kokoro/presubmit/java11.cfg | 7 - .kokoro/presubmit/java7.cfg | 7 - .kokoro/presubmit/java8-osx.cfg | 3 - .kokoro/presubmit/java8-win.cfg | 3 - .kokoro/presubmit/java8.cfg | 12 - .kokoro/presubmit/linkage-monitor.cfg | 12 - .kokoro/presubmit/lint.cfg | 13 - .kokoro/presubmit/samples.cfg | 33 - .kokoro/readme.sh | 45 - .kokoro/release/bump_snapshot.cfg | 53 - .kokoro/release/common.cfg | 49 - .kokoro/release/common.sh | 50 - .kokoro/release/drop.cfg | 6 - .kokoro/release/drop.sh | 32 - .kokoro/release/promote.cfg | 6 - .kokoro/release/promote.sh | 34 - .kokoro/release/publish_javadoc.cfg | 23 - .kokoro/release/publish_javadoc.sh | 53 - .kokoro/release/publish_javadoc11.cfg | 30 - .kokoro/release/publish_javadoc11.sh | 63 - .kokoro/release/snapshot.cfg | 6 - .kokoro/release/snapshot.sh | 33 - .kokoro/release/stage.cfg | 19 - .kokoro/release/stage.sh | 47 - .kokoro/requirements.in | 33 - .kokoro/requirements.txt | 456 - .kokoro/trampoline.sh | 26 - .repo-metadata.json | 17 - CHANGELOG.md | 338 - codecov.yaml | 4 - google-cloud-binary-authorization-bom/pom.xml | 95 - google-cloud-binary-authorization/pom.xml | 141 - ...inauthzManagementServiceV1Beta1Client.java | 1209 -- ...authzManagementServiceV1Beta1Settings.java | 283 - .../v1beta1/SystemPolicyV1Beta1Client.java | 312 - .../v1beta1/SystemPolicyV1Beta1Settings.java | 208 - .../v1beta1/gapic_metadata.json | 51 - .../v1beta1/package-info.java | 68 - .../BinauthzManagementServiceV1Beta1Stub.java | 82 - ...zManagementServiceV1Beta1StubSettings.java | 558 - ...nagementServiceV1Beta1CallableFactory.java | 116 - ...cBinauthzManagementServiceV1Beta1Stub.java | 365 - ...rpcSystemPolicyV1Beta1CallableFactory.java | 115 - .../stub/GrpcSystemPolicyV1Beta1Stub.java | 165 - ...nagementServiceV1Beta1CallableFactory.java | 105 - ...nBinauthzManagementServiceV1Beta1Stub.java | 527 - ...sonSystemPolicyV1Beta1CallableFactory.java | 105 - .../stub/HttpJsonSystemPolicyV1Beta1Stub.java | 194 - .../v1beta1/stub/SystemPolicyV1Beta1Stub.java | 42 - .../stub/SystemPolicyV1Beta1StubSettings.java | 317 - .../v1/BinauthzManagementServiceV1Client.java | 1223 -- .../BinauthzManagementServiceV1Settings.java | 285 - .../v1/SystemPolicyV1Client.java | 310 - .../v1/SystemPolicyV1Settings.java | 205 - .../v1/ValidationHelperV1Client.java | 273 - .../v1/ValidationHelperV1Settings.java | 214 - .../v1/gapic_metadata.json | 63 - .../binaryauthorization/v1/package-info.java | 95 - .../stub/BinauthzManagementServiceV1Stub.java | 73 - ...nauthzManagementServiceV1StubSettings.java | 575 - ...thzManagementServiceV1CallableFactory.java | 113 - .../GrpcBinauthzManagementServiceV1Stub.java | 369 - .../GrpcSystemPolicyV1CallableFactory.java | 113 - .../v1/stub/GrpcSystemPolicyV1Stub.java | 165 - ...GrpcValidationHelperV1CallableFactory.java | 113 - .../v1/stub/GrpcValidationHelperV1Stub.java | 184 - ...thzManagementServiceV1CallableFactory.java | 105 - ...tpJsonBinauthzManagementServiceV1Stub.java | 529 - ...HttpJsonSystemPolicyV1CallableFactory.java | 105 - .../v1/stub/HttpJsonSystemPolicyV1Stub.java | 194 - ...JsonValidationHelperV1CallableFactory.java | 105 - .../stub/HttpJsonValidationHelperV1Stub.java | 218 - .../v1/stub/SystemPolicyV1Stub.java | 40 - .../v1/stub/SystemPolicyV1StubSettings.java | 315 - .../v1/stub/ValidationHelperV1Stub.java | 43 - .../stub/ValidationHelperV1StubSettings.java | 329 - ...ementServiceV1Beta1ClientHttpJsonTest.java | 687 - ...thzManagementServiceV1Beta1ClientTest.java | 591 - .../MockBinauthzManagementServiceV1Beta1.java | 59 - ...kBinauthzManagementServiceV1Beta1Impl.java | 206 - .../v1beta1/MockSystemPolicyV1Beta1.java | 59 - .../v1beta1/MockSystemPolicyV1Beta1Impl.java | 81 - ...SystemPolicyV1Beta1ClientHttpJsonTest.java | 180 - .../SystemPolicyV1Beta1ClientTest.java | 172 - ...ManagementServiceV1ClientHttpJsonTest.java | 699 - ...BinauthzManagementServiceV1ClientTest.java | 605 - .../v1/MockBinauthzManagementServiceV1.java | 59 - .../MockBinauthzManagementServiceV1Impl.java | 209 - .../v1/MockSystemPolicyV1.java | 59 - .../v1/MockSystemPolicyV1Impl.java | 81 - .../v1/MockValidationHelperV1.java | 59 - .../v1/MockValidationHelperV1Impl.java | 82 - .../v1/SystemPolicyV1ClientHttpJsonTest.java | 184 - .../v1/SystemPolicyV1ClientTest.java | 178 - .../ValidationHelperV1ClientHttpJsonTest.java | 131 - .../v1/ValidationHelperV1ClientTest.java | 134 - .../pom.xml | 65 - .../v1/BinauthzManagementServiceV1Grpc.java | 1246 -- .../v1/SystemPolicyV1Grpc.java | 376 - .../v1/ValidationHelperV1Grpc.java | 411 - .../pom.xml | 65 - .../BinauthzManagementServiceV1Beta1Grpc.java | 1195 -- .../v1beta1/SystemPolicyV1Beta1Grpc.java | 369 - java.header | 15 - license-checks.xml | 10 - pom.xml | 201 - .../clirr-ignored-differences.xml | 5 - .../pom.xml | 46 - .../binaryauthorization/v1/AttestorName.java | 192 - .../binaryauthorization/v1/PolicyName.java | 254 - .../binaryauthorization/v1/ProjectName.java | 168 - .../binaryauthorization/v1/Resources.java | 14296 ---------------- .../cloud/binaryauthorization/v1/Service.java | 10969 ------------ .../binaryauthorization/v1/resources.proto | 333 - .../binaryauthorization/v1/service.proto | 312 - .../clirr-ignored-differences.xml | 19 - .../pom.xml | 42 - .../v1beta1/AdmissionRule.java | 1511 -- .../v1beta1/AdmissionRuleOrBuilder.java | 162 - .../v1beta1/AdmissionWhitelistPattern.java | 671 - .../AdmissionWhitelistPatternOrBuilder.java | 62 - .../binaryauthorization/v1beta1/Attestor.java | 1510 -- .../v1beta1/AttestorName.java | 192 - .../v1beta1/AttestorOrBuilder.java | 162 - .../v1beta1/AttestorPublicKey.java | 1574 -- .../v1beta1/AttestorPublicKeyOrBuilder.java | 195 - .../BinaryAuthorizationResourcesProto.java | 311 - .../BinaryAuthorizationServiceProto.java | 265 - .../v1beta1/ContinuousValidationEvent.java | 5810 ------- .../ContinuousValidationEventOrBuilder.java | 117 - .../ContinuousValidationLoggingProto.java | 144 - .../v1beta1/CreateAttestorRequest.java | 1134 -- .../CreateAttestorRequestOrBuilder.java | 126 - .../v1beta1/DeleteAttestorRequest.java | 647 - .../DeleteAttestorRequestOrBuilder.java | 56 - .../v1beta1/GetAttestorRequest.java | 643 - .../v1beta1/GetAttestorRequestOrBuilder.java | 56 - .../v1beta1/GetPolicyRequest.java | 640 - .../v1beta1/GetPolicyRequestOrBuilder.java | 56 - .../v1beta1/GetSystemPolicyRequest.java | 647 - .../GetSystemPolicyRequestOrBuilder.java | 56 - .../v1beta1/ListAttestorsRequest.java | 932 - .../ListAttestorsRequestOrBuilder.java | 99 - .../v1beta1/ListAttestorsResponse.java | 1142 -- .../ListAttestorsResponseOrBuilder.java | 106 - .../v1beta1/PkixPublicKey.java | 1283 -- .../v1beta1/PkixPublicKeyOrBuilder.java | 90 - .../binaryauthorization/v1beta1/Policy.java | 4021 ----- .../v1beta1/PolicyName.java | 254 - .../v1beta1/PolicyOrBuilder.java | 623 - .../v1beta1/ProjectName.java | 168 - .../v1beta1/UpdateAttestorRequest.java | 763 - .../UpdateAttestorRequestOrBuilder.java | 72 - .../v1beta1/UpdatePolicyRequest.java | 759 - .../v1beta1/UpdatePolicyRequestOrBuilder.java | 72 - .../v1beta1/UserOwnedDrydockNote.java | 1599 -- .../UserOwnedDrydockNoteOrBuilder.java | 195 - .../continuous_validation_logging.proto | 100 - .../v1beta1/resources.proto | 343 - .../binaryauthorization/v1beta1/service.proto | 252 - renovate.json | 76 - samples/install-without-bom/pom.xml | 84 - samples/pom.xml | 56 - samples/snapshot/pom.xml | 83 - .../SyncCreateSetCredentialsProvider.java | 45 - .../SyncCreateSetCredentialsProvider1.java | 41 - .../create/SyncCreateSetEndpoint.java | 42 - .../createattestor/AsyncCreateAttestor.java | 53 - .../createattestor/SyncCreateAttestor.java | 49 - ...eateAttestorProjectnameStringAttestor.java | 46 - ...yncCreateAttestorStringStringAttestor.java | 46 - .../deleteattestor/AsyncDeleteAttestor.java | 51 - .../deleteattestor/SyncDeleteAttestor.java | 47 - .../SyncDeleteAttestorAttestorname.java | 43 - .../SyncDeleteAttestorString.java | 43 - .../getattestor/AsyncGetAttestor.java | 51 - .../getattestor/SyncGetAttestor.java | 47 - .../SyncGetAttestorAttestorname.java | 43 - .../getattestor/SyncGetAttestorString.java | 43 - .../getpolicy/AsyncGetPolicy.java | 51 - .../getpolicy/SyncGetPolicy.java | 47 - .../getpolicy/SyncGetPolicyPolicyname.java | 43 - .../getpolicy/SyncGetPolicyString.java | 43 - .../listattestors/AsyncListAttestors.java | 55 - .../AsyncListAttestorsPaged.java | 63 - .../listattestors/SyncListAttestors.java | 52 - .../SyncListAttestorsProjectname.java | 46 - .../SyncListAttestorsString.java | 46 - .../updateattestor/AsyncUpdateAttestor.java | 48 - .../updateattestor/SyncUpdateAttestor.java | 44 - .../SyncUpdateAttestorAttestor.java | 42 - .../updatepolicy/AsyncUpdatePolicy.java | 48 - .../updatepolicy/SyncUpdatePolicy.java | 44 - .../updatepolicy/SyncUpdatePolicyPolicy.java | 42 - .../getpolicy/SyncGetPolicy.java | 51 - .../getpolicy/SyncGetPolicy.java | 51 - .../getsystempolicy/SyncGetSystemPolicy.java | 50 - .../SyncCreateSetCredentialsProvider.java | 45 - .../SyncCreateSetCredentialsProvider1.java | 41 - .../create/SyncCreateSetEndpoint.java | 42 - .../getsystempolicy/AsyncGetSystemPolicy.java | 50 - .../getsystempolicy/SyncGetSystemPolicy.java | 46 - .../SyncGetSystemPolicyPolicyname.java | 42 - .../SyncGetSystemPolicyString.java | 42 - .../getsystempolicy/SyncGetSystemPolicy.java | 50 - .../SyncCreateSetCredentialsProvider.java | 45 - .../SyncCreateSetCredentialsProvider1.java | 41 - .../create/SyncCreateSetEndpoint.java | 42 - .../createattestor/AsyncCreateAttestor.java | 53 - .../createattestor/SyncCreateAttestor.java | 49 - ...torProjectnameStringResourcesattestor.java | 46 - ...AttestorStringStringResourcesattestor.java | 46 - .../deleteattestor/AsyncDeleteAttestor.java | 51 - .../deleteattestor/SyncDeleteAttestor.java | 47 - .../SyncDeleteAttestorAttestorname.java | 43 - .../SyncDeleteAttestorString.java | 43 - .../getattestor/AsyncGetAttestor.java | 51 - .../getattestor/SyncGetAttestor.java | 47 - .../SyncGetAttestorAttestorname.java | 43 - .../getattestor/SyncGetAttestorString.java | 43 - .../getpolicy/AsyncGetPolicy.java | 51 - .../getpolicy/SyncGetPolicy.java | 47 - .../getpolicy/SyncGetPolicyPolicyname.java | 43 - .../getpolicy/SyncGetPolicyString.java | 43 - .../listattestors/AsyncListAttestors.java | 55 - .../AsyncListAttestorsPaged.java | 62 - .../listattestors/SyncListAttestors.java | 52 - .../SyncListAttestorsProjectname.java | 46 - .../SyncListAttestorsString.java | 46 - .../updateattestor/AsyncUpdateAttestor.java | 50 - .../updateattestor/SyncUpdateAttestor.java | 46 - .../SyncUpdateAttestorResourcesattestor.java | 42 - .../updatepolicy/AsyncUpdatePolicy.java | 50 - .../updatepolicy/SyncUpdatePolicy.java | 46 - .../SyncUpdatePolicyResourcespolicy.java | 42 - .../getpolicy/SyncGetPolicy.java | 50 - .../getpolicy/SyncGetPolicy.java | 50 - .../getsystempolicy/SyncGetSystemPolicy.java | 46 - .../SyncValidateAttestationOccurrence.java | 50 - .../SyncCreateSetCredentialsProvider.java | 44 - .../SyncCreateSetCredentialsProvider1.java | 40 - .../create/SyncCreateSetEndpoint.java | 41 - .../getsystempolicy/AsyncGetSystemPolicy.java | 50 - .../getsystempolicy/SyncGetSystemPolicy.java | 46 - .../SyncGetSystemPolicyPolicyname.java | 42 - .../SyncGetSystemPolicyString.java | 42 - .../getsystempolicy/SyncGetSystemPolicy.java | 46 - .../SyncCreateSetCredentialsProvider.java | 45 - .../SyncCreateSetCredentialsProvider1.java | 41 - .../create/SyncCreateSetEndpoint.java | 42 - .../AsyncValidateAttestationOccurrence.java | 52 - .../SyncValidateAttestationOccurrence.java | 49 - .../SyncValidateAttestationOccurrence.java | 50 - samples/snippets/pom.xml | 47 - versions.txt | 8 - 295 files changed, 83436 deletions(-) delete mode 100644 .github/CODEOWNERS delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .github/ISSUE_TEMPLATE/support_request.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE.md delete mode 100644 .github/auto-label.yaml delete mode 100644 .github/blunderbuss.yml delete mode 100644 .github/generated-files-bot.yml delete mode 100644 .github/snippet-bot.yml delete mode 100644 .github/sync-repo-settings.yaml delete mode 100644 .github/trusted-contribution.yml delete mode 100644 .github/workflows/approve-readme.yaml delete mode 100644 .github/workflows/auto-release.yaml delete mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/samples.yaml delete mode 100644 .gitignore delete mode 100644 .kokoro/build.bat delete mode 100755 .kokoro/build.sh delete mode 100755 .kokoro/coerce_logs.sh delete mode 100644 .kokoro/common.cfg delete mode 100644 .kokoro/common.sh delete mode 100644 .kokoro/continuous/common.cfg delete mode 100644 .kokoro/continuous/java8.cfg delete mode 100755 .kokoro/dependencies.sh delete mode 100644 .kokoro/nightly/common.cfg delete mode 100644 .kokoro/nightly/integration.cfg delete mode 100644 .kokoro/nightly/java11-integration.cfg delete mode 100644 .kokoro/nightly/java11.cfg delete mode 100644 .kokoro/nightly/java7.cfg delete mode 100644 .kokoro/nightly/java8-osx.cfg delete mode 100644 .kokoro/nightly/java8-win.cfg delete mode 100644 .kokoro/nightly/java8.cfg delete mode 100644 .kokoro/nightly/samples.cfg delete mode 100755 .kokoro/populate-secrets.sh delete mode 100644 .kokoro/presubmit/clirr.cfg delete mode 100644 .kokoro/presubmit/common.cfg delete mode 100644 .kokoro/presubmit/dependencies.cfg delete mode 100644 .kokoro/presubmit/graalvm-native-17.cfg delete mode 100644 .kokoro/presubmit/graalvm-native.cfg delete mode 100644 .kokoro/presubmit/integration.cfg delete mode 100644 .kokoro/presubmit/java11.cfg delete mode 100644 .kokoro/presubmit/java7.cfg delete mode 100644 .kokoro/presubmit/java8-osx.cfg delete mode 100644 .kokoro/presubmit/java8-win.cfg delete mode 100644 .kokoro/presubmit/java8.cfg delete mode 100644 .kokoro/presubmit/linkage-monitor.cfg delete mode 100644 .kokoro/presubmit/lint.cfg delete mode 100644 .kokoro/presubmit/samples.cfg delete mode 100755 .kokoro/readme.sh delete mode 100644 .kokoro/release/bump_snapshot.cfg delete mode 100644 .kokoro/release/common.cfg delete mode 100755 .kokoro/release/common.sh delete mode 100644 .kokoro/release/drop.cfg delete mode 100755 .kokoro/release/drop.sh delete mode 100644 .kokoro/release/promote.cfg delete mode 100755 .kokoro/release/promote.sh delete mode 100644 .kokoro/release/publish_javadoc.cfg delete mode 100755 .kokoro/release/publish_javadoc.sh delete mode 100644 .kokoro/release/publish_javadoc11.cfg delete mode 100755 .kokoro/release/publish_javadoc11.sh delete mode 100644 .kokoro/release/snapshot.cfg delete mode 100755 .kokoro/release/snapshot.sh delete mode 100644 .kokoro/release/stage.cfg delete mode 100755 .kokoro/release/stage.sh delete mode 100644 .kokoro/requirements.in delete mode 100644 .kokoro/requirements.txt delete mode 100644 .kokoro/trampoline.sh delete mode 100644 .repo-metadata.json delete mode 100644 CHANGELOG.md delete mode 100644 codecov.yaml delete mode 100644 google-cloud-binary-authorization-bom/pom.xml delete mode 100644 google-cloud-binary-authorization/pom.xml delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java delete mode 100644 google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java delete mode 100644 google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java delete mode 100644 grpc-google-cloud-binary-authorization-v1/pom.xml delete mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java delete mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java delete mode 100644 grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java delete mode 100644 grpc-google-cloud-binary-authorization-v1beta1/pom.xml delete mode 100644 grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java delete mode 100644 grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java delete mode 100644 java.header delete mode 100644 license-checks.xml delete mode 100644 pom.xml delete mode 100644 proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml delete mode 100644 proto-google-cloud-binary-authorization-v1/pom.xml delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto delete mode 100644 proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/clirr-ignored-differences.xml delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/pom.xml delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRuleOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKeyOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEventOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKeyOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNoteOrBuilder.java delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto delete mode 100644 proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto delete mode 100644 renovate.json delete mode 100644 samples/install-without-bom/pom.xml delete mode 100644 samples/pom.xml delete mode 100644 samples/snapshot/pom.xml delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java delete mode 100644 samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java delete mode 100644 samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java delete mode 100644 samples/snippets/pom.xml delete mode 100644 versions.txt diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS deleted file mode 100644 index 5232f38f..00000000 --- a/.github/CODEOWNERS +++ /dev/null @@ -1,15 +0,0 @@ -# Code owners file. -# This file controls who is tagged for review for any given pull request. - -# For syntax help see: -# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax - -# The @googleapis/aap-dpes is the default owner for changes in this repo -* @googleapis/yoshi-java @googleapis/aap-dpes - - -# The java-samples-reviewers team is the default owner for samples changes -samples/**/*.java @googleapis/java-samples-reviewers - -# Generated snippets should not be owned by samples reviewers -samples/snippets/generated/ @googleapis/yoshi-java diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 823d4ad9..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve - ---- - -:bus: This library has moved to -[google-cloud-java/java-binary-authorization]( -https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization). -This repository will be archived in the future. - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - -Please run down the following list and make sure you've tried the usual "quick fixes": - - - Search the issues already opened: https://github.com/googleapis/java-binary-authorization/issues - - Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform - -If you are still having issues, please include as much information as possible: - -#### Environment details - -1. Specify the API at the beginning of the title. For example, "BigQuery: ..."). - General, Core, and Other are also allowed as types -2. OS type and version: -3. Java version: -4. version(s): - -#### Steps to reproduce - - 1. ? - 2. ? - -#### Code example - -```java -// example -``` - -#### Stack trace -``` -Any relevant stacktrace here. -``` - -#### External references such as API reference guides - -- ? - -#### Any additional information below - - -Following these steps guarantees the quickest resolution possible. - -Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index 076dfd21..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,26 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this library - ---- - -:bus: This library has moved to -[google-cloud-java/java-binary-authorization]( -https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorization). -This repository will be archived in the future. - -Thanks for stopping by to let us know something could be better! - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. - -**Is your feature request related to a problem? Please describe.** -What the problem is. Example: I'm always frustrated when [...] - -**Describe the solution you'd like** -What you want to happen. - -**Describe alternatives you've considered** -Any alternative solutions or features you've considered. - -**Additional context** -Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md deleted file mode 100644 index 99586903..00000000 --- a/.github/ISSUE_TEMPLATE/support_request.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -name: Support request -about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. - ---- - -**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index 5cd38b14..00000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,10 +0,0 @@ -Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: -- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-binary-authorization/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea -- [ ] Ensure the tests and linter pass -- [ ] Code coverage does not decrease (if any source code was changed) -- [ ] Appropriate docs were updated (if necessary) - -Fixes # ☕️ - -If you write sample code, please follow the [samples format]( -https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md). diff --git a/.github/auto-label.yaml b/.github/auto-label.yaml deleted file mode 100644 index 4caef688..00000000 --- a/.github/auto-label.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# 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. -requestsize: - enabled: true diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml deleted file mode 100644 index 2176b054..00000000 --- a/.github/blunderbuss.yml +++ /dev/null @@ -1,7 +0,0 @@ -# Configuration for the Blunderbuss GitHub app. For more info see -# https://github.com/googleapis/repo-automation-bots/tree/main/packages/blunderbuss -assign_prs_by: -- labels: - - samples - to: - - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml deleted file mode 100644 index c644a24e..00000000 --- a/.github/generated-files-bot.yml +++ /dev/null @@ -1,12 +0,0 @@ -externalManifests: -- type: json - file: 'synth.metadata' - jsonpath: '$.generatedFiles[*]' -- type: json - file: '.github/readme/synth.metadata/synth.metadata' - jsonpath: '$.generatedFiles[*]' -ignoreAuthors: -- 'renovate-bot' -- 'yoshi-automation' -- 'release-please[bot]' -- 'gcf-owl-bot[bot]' diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml deleted file mode 100644 index e69de29b..00000000 diff --git a/.github/sync-repo-settings.yaml b/.github/sync-repo-settings.yaml deleted file mode 100644 index 0501f63f..00000000 --- a/.github/sync-repo-settings.yaml +++ /dev/null @@ -1,42 +0,0 @@ -rebaseMergeAllowed: false -squashMergeAllowed: true -mergeCommitAllowed: false -branchProtectionRules: - - pattern: main - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor - - 'Kokoro - Test: Java GraalVM Native Image' - - 'Kokoro - Test: Java 17 GraalVM Native Image' - - pattern: java7 - isAdminEnforced: true - requiredApprovingReviewCount: 1 - requiresCodeOwnerReviews: true - requiresStrictStatusChecks: false - requiredStatusCheckContexts: - - dependencies (8) - - dependencies (11) - - lint - - units (7) - - units (8) - - units (11) - - 'Kokoro - Test: Integration' - - cla/google - - OwlBot Post Processor -permissionRules: - - team: yoshi-admins - permission: admin - - team: yoshi-java-admins - permission: admin - - team: yoshi-java - permission: push diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml deleted file mode 100644 index a0ba1f7d..00000000 --- a/.github/trusted-contribution.yml +++ /dev/null @@ -1,3 +0,0 @@ -trustedContributors: -- renovate-bot -- gcf-owl-bot[bot] diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml deleted file mode 100644 index f5fc7d51..00000000 --- a/.github/workflows/approve-readme.yaml +++ /dev/null @@ -1,69 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-merge-readme -jobs: - approve: - runs-on: ubuntu-latest - if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - script: | - // only approve PRs from yoshi-automation - if (context.payload.pull_request.user.login !== "yoshi-automation") { - return; - } - - // only approve PRs like "chore: release " - if (!context.payload.pull_request.title === "chore: regenerate README") { - return; - } - - // only approve PRs with README.md and synth.metadata changes - const files = new Set( - ( - await github.paginate( - github.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }) - ) - ).map(file => file.filename) - ); - if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { - return; - } - - // approve README regeneration PR - await github.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped PR!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach automerge label - await github.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['automerge'] - }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml deleted file mode 100644 index 7a106d00..00000000 --- a/.github/workflows/auto-release.yaml +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: auto-release -jobs: - approve: - runs-on: ubuntu-latest - if: contains(github.head_ref, 'release-please') - steps: - - uses: actions/github-script@v6 - with: - github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} - debug: true - script: | - // only approve PRs from release-please[bot] - if (context.payload.pull_request.user.login !== "release-please[bot]") { - return; - } - - // only approve PRs like "chore(main): release " - if ( !context.payload.pull_request.title.startsWith("chore(main): release") ) { - return; - } - - // only approve PRs with pom.xml and versions.txt changes - const filesPromise = github.rest.pulls.listFiles.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - pull_number: context.payload.pull_request.number, - }); - const changed_files = await github.paginate(filesPromise) - - if ( changed_files.length < 1 ) { - console.log( "Not proceeding since PR is empty!" ) - return; - } - - if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { - console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) - return; - } - - // trigger auto-release when - // 1) it is a SNAPSHOT release (auto-generated post regular release) - // 2) there are dependency updates only - // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) - if ( - context.payload.pull_request.body.includes("Fix") || - context.payload.pull_request.body.includes("Build") || - context.payload.pull_request.body.includes("Documentation") || - context.payload.pull_request.body.includes("BREAKING CHANGES") || - context.payload.pull_request.body.includes("Features") - ) { - console.log( "Not auto-releasing since it is not a dependency-update-only release." ); - return; - } - - const promise = github.rest.pulls.list.endpoint({ - owner: context.repo.owner, - repo: context.repo.repo, - state: 'open' - }); - const open_pulls = await github.paginate(promise) - - if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { - for ( const pull of open_pulls ) { - if ( pull.title.startsWith("deps: update dependency") ) { - console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); - return; - } - } - } - - // approve release PR - await github.rest.pulls.createReview({ - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Rubber stamped release!', - pull_number: context.payload.pull_request.number, - event: 'APPROVE' - }); - - // attach kokoro:force-run and automerge labels - await github.rest.issues.addLabels({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.payload.pull_request.number, - labels: ['kokoro:force-run', 'automerge'] - }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml deleted file mode 100644 index e3bb26e3..00000000 --- a/.github/workflows/ci.yaml +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - push: - branches: - - main - pull_request: -name: ci -jobs: - units: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: test - windows: - runs-on: windows-latest - steps: - - name: Support longpaths - run: git config --system core.longpaths true - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.bat - env: - JOB_TYPE: test - dependencies: - runs-on: ubuntu-latest - strategy: - matrix: - java: [8, 11, 17] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: ${{matrix.java}} - - run: java -version - - run: .kokoro/dependencies.sh - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 11 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: lint - clirr: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - run: java -version - - run: .kokoro/build.sh - env: - JOB_TYPE: clirr diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml deleted file mode 100644 index 912ed8b2..00000000 --- a/.github/workflows/samples.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2022 Google LLC -# -# Licensed under the Apache License, Version 2.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. -# Github action job to test core java library features on -# downstream client libraries before they are released. -on: - pull_request: -name: samples -jobs: - checkstyle: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-java@v3 - with: - distribution: zulu - java-version: 8 - - name: Run checkstyle - run: mvn -P lint --quiet --batch-mode checkstyle:check - working-directory: samples/snippets diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 069d08fc..00000000 --- a/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# Maven -target/ - -# Eclipse -.classpath -.project -.settings - -# Intellij -*.iml -.idea/ - -# python utilities -*.pyc -__pycache__ - -.flattened-pom.xml diff --git a/.kokoro/build.bat b/.kokoro/build.bat deleted file mode 100644 index 067cf4a4..00000000 --- a/.kokoro/build.bat +++ /dev/null @@ -1,18 +0,0 @@ -:: Copyright 2022 Google LLC -:: -:: Licensed under the Apache License, Version 2.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. -:: Github action job to test core java library features on -:: downstream client libraries before they are released. -:: See documentation in type-shell-output.bat - -"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh deleted file mode 100755 index 05993970..00000000 --- a/.kokoro/build.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Maven & Java version -mvn -version -echo ${JOB_TYPE} - -# attempt to install 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ - -DskipTests=true \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -Dmaven.javadoc.skip=true \ - -Dgcloud.download.skip=true \ - -T 1C - -# if GOOGLE_APPLICATION_CREDENTIALS is specified as a relative path, prepend Kokoro root directory onto it -if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then - export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) -fi - -RETURN_CODE=0 -set +e - -case ${JOB_TYPE} in -test) - mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true - RETURN_CODE=$? - ;; -lint) - mvn com.coveo:fmt-maven-plugin:check -B -ntp - RETURN_CODE=$? - ;; -javadoc) - mvn javadoc:javadoc javadoc:test-javadoc -B -ntp - RETURN_CODE=$? - ;; -integration) - mvn -B ${INTEGRATION_TEST_ARGS} \ - -ntp \ - -Penable-integration-tests \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - ;; -graalvm) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test - RETURN_CODE=$? - ;; -graalvm17) - # Run Unit and Integration Tests with Native Image - mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test - RETURN_CODE=$? - ;; -samples) - SAMPLES_DIR=samples - # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. - if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] - then - SAMPLES_DIR=samples/snapshot - fi - - if [[ -f ${SAMPLES_DIR}/pom.xml ]] - then - for FILE in ${KOKORO_GFILE_DIR}/secret_manager/*-samples-secrets; do - [[ -f "$FILE" ]] || continue - source "$FILE" - done - - pushd ${SAMPLES_DIR} - mvn -B \ - -ntp \ - -DtrimStackTrace=false \ - -Dclirr.skip=true \ - -Denforcer.skip=true \ - -fae \ - verify - RETURN_CODE=$? - popd - else - echo "no sample pom.xml found - skipping sample tests" - fi - ;; -clirr) - mvn -B -ntp -Denforcer.skip=true clirr:check - RETURN_CODE=$? - ;; -*) - ;; -esac - -if [ "${REPORT_COVERAGE}" == "true" ] -then - bash ${KOKORO_GFILE_DIR}/codecov.sh -fi - -# fix output location of logs -bash .kokoro/coerce_logs.sh - -if [[ "${ENABLE_FLAKYBOT}" == "true" ]] -then - chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot - ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-binary-authorization -fi - -echo "exiting with ${RETURN_CODE}" -exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh deleted file mode 100755 index 46edbf7f..00000000 --- a/.kokoro/coerce_logs.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# This script finds and moves sponge logs so that they can be found by placer -# and are not flagged as flaky by sponge. - -set -eo pipefail - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -job=$(basename ${KOKORO_JOB_NAME}) - -echo "coercing sponge logs..." -for xml in `find . -name *-sponge_log.xml` -do - class=$(basename ${xml} | cut -d- -f2) - dir=$(dirname ${xml})/${job}/${class} - text=$(dirname ${xml})/${class}-sponge_log.txt - mkdir -p ${dir} - mv ${xml} ${dir}/sponge_log.xml - mv ${text} ${dir}/sponge_log.txt -done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg deleted file mode 100644 index 42c6b5c1..00000000 --- a/.kokoro/common.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# All builds use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -# Tell the trampoline which build file to use. -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/build.sh" -} diff --git a/.kokoro/common.sh b/.kokoro/common.sh deleted file mode 100644 index f8f957af..00000000 --- a/.kokoro/common.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -function retry_with_backoff { - attempts_left=$1 - sleep_seconds=$2 - shift 2 - command=$@ - - - # store current flag state - flags=$- - - # allow a failures to continue - set +e - ${command} - exit_code=$? - - # restore "e" flag - if [[ ${flags} =~ e ]] - then set -e - else set +e - fi - - if [[ $exit_code == 0 ]] - then - return 0 - fi - - # failure - if [[ ${attempts_left} > 0 ]] - then - echo "failure (${exit_code}), sleeping ${sleep_seconds}..." - sleep ${sleep_seconds} - new_attempts=$((${attempts_left} - 1)) - new_sleep=$((${sleep_seconds} * 2)) - retry_with_backoff ${new_attempts} ${new_sleep} ${command} - fi - - return $exit_code -} - -## Helper functionss -function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } -function msg() { println "$*" >&2; } -function println() { printf '%s\n' "$(now) $*"; } - -## Helper comment to trigger updated repo dependency release \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg deleted file mode 100644 index 5f5d8564..00000000 --- a/.kokoro/continuous/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/continuous/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh deleted file mode 100755 index 1351152b..00000000 --- a/.kokoro/dependencies.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail -shopt -s nullglob - -## Get the directory of the build script -scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) -## cd to the parent directory, i.e. the root of the git repo -cd ${scriptDir}/.. - -# include common functions -source ${scriptDir}/common.sh - -# Print out Java -java -version -echo $JOB_TYPE - -function determineMavenOpts() { - local javaVersion=$( - # filter down to the version line, then pull out the version between quotes, - # then trim the version number down to its minimal number (removing any - # update or suffix number). - java -version 2>&1 | grep "version" \ - | sed -E 's/^.*"(.*?)".*$/\1/g' \ - | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' - ) - - if [[ $javaVersion == 17* ]] - then - # MaxPermSize is no longer supported as of jdk 17 - echo -n "-Xmx1024m" - else - echo -n "-Xmx1024m -XX:MaxPermSize=128m" - fi -} - -export MAVEN_OPTS=$(determineMavenOpts) - -# this should run maven enforcer -retry_with_backoff 3 10 \ - mvn install -B -V -ntp \ - -DskipTests=true \ - -Dmaven.javadoc.skip=true \ - -Dclirr.skip=true - -mvn -B dependency:analyze -DfailOnWarning=true - -echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" -## Run dependency list completeness check -function completenessCheck() { - # Output dep list with compile scope generated using the original pom - # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. - # This is stripped from the output as it is not present in the flattened pom. - # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. - msg "Generating dependency list using original pom..." - mvn dependency:list -f pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,opencensus-api,opencensus-contrib-http-util,httpclient,httpcore -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt - - # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) - msg "Generating dependency list using flattened pom..." - mvn dependency:list -f .flattened-pom.xml -DexcludeArtifactIds=commons-codec,commons-logging,opencensus-api,opencensus-contrib-http-util,httpclient,httpcore -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt - - # Compare two dependency lists - msg "Comparing dependency lists..." - diff .org-list.txt .new-list.txt >.diff.txt - if [[ $? == 0 ]] - then - msg "Success. No diff!" - else - msg "Diff found. See below: " - msg "You can also check .diff.txt file located in $1." - cat .diff.txt - return 1 - fi -} - -# Allow failures to continue running the script -set +e - -error_count=0 -for path in **/.flattened-pom.xml -do - # Check flattened pom in each dir that contains it for completeness - dir=$(dirname "$path") - pushd "$dir" - completenessCheck "$dir" - error_count=$(($error_count + $?)) - popd -done - -if [[ $error_count == 0 ]] -then - msg "All checks passed." - exit 0 -else - msg "Errors found. See log statements above." - exit 1 -fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg deleted file mode 100644 index 5f5d8564..00000000 --- a/.kokoro/nightly/common.cfg +++ /dev/null @@ -1,25 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg deleted file mode 100644 index bd0297a3..00000000 --- a/.kokoro/nightly/integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11-integration.cfg b/.kokoro/nightly/java11-integration.cfg deleted file mode 100644 index dc51b65e..00000000 --- a/.kokoro/nightly/java11-integration.cfg +++ /dev/null @@ -1,37 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-public-resources/java11014" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/nightly/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/nightly/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg deleted file mode 100644 index cb766dbe..00000000 --- a/.kokoro/nightly/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-binary-authorization/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg deleted file mode 100644 index ca60e33b..00000000 --- a/.kokoro/nightly/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-binary-authorization/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/nightly/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg deleted file mode 100644 index fee6a838..00000000 --- a/.kokoro/nightly/samples.cfg +++ /dev/null @@ -1,38 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} - -env_vars: { - key: "ENABLE_FLAKYBOT" - value: "false" -} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh deleted file mode 100755 index f5251425..00000000 --- a/.kokoro/populate-secrets.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} -function msg { println "$*" >&2 ;} -function println { printf '%s\n' "$(now) $*" ;} - - -# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: -# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com -SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" -msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" -mkdir -p ${SECRET_LOCATION} -for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") -do - msg "Retrieving secret ${key}" - docker run --entrypoint=gcloud \ - --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ - gcr.io/google.com/cloudsdktool/cloud-sdk \ - secrets versions access latest \ - --project cloud-devrel-kokoro-resources \ - --secret ${key} > \ - "${SECRET_LOCATION}/${key}" - if [[ $? == 0 ]]; then - msg "Secret written to ${SECRET_LOCATION}/${key}" - else - msg "Error retrieving secret ${key}" - fi -done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg deleted file mode 100644 index ec572442..00000000 --- a/.kokoro/presubmit/clirr.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "clirr" -} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg deleted file mode 100644 index e58f7a4d..00000000 --- a/.kokoro/presubmit/common.cfg +++ /dev/null @@ -1,34 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - regex: "**/*sponge_log.txt" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/build.sh" -} - -env_vars: { - key: "JOB_TYPE" - value: "test" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "dpebot_codecov_token" - } - } -} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg deleted file mode 100644 index 58c93201..00000000 --- a/.kokoro/presubmit/dependencies.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/dependencies.sh" -} diff --git a/.kokoro/presubmit/graalvm-native-17.cfg b/.kokoro/presubmit/graalvm-native-17.cfg deleted file mode 100644 index a3f7fb9d..00000000 --- a/.kokoro/presubmit/graalvm-native-17.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm17" -} - -env_vars: { - key: "JOB_TYPE" - value: "graalvm17" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} \ No newline at end of file diff --git a/.kokoro/presubmit/graalvm-native.cfg b/.kokoro/presubmit/graalvm-native.cfg deleted file mode 100644 index 4c7225ec..00000000 --- a/.kokoro/presubmit/graalvm-native.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/graalvm" -} - -env_vars: { - key: "JOB_TYPE" - value: "graalvm" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg deleted file mode 100644 index dded67a9..00000000 --- a/.kokoro/presubmit/integration.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "integration" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "gcloud-devel" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-it-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-it-service-account" -} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg deleted file mode 100644 index 709f2b4c..00000000 --- a/.kokoro/presubmit/java11.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg deleted file mode 100644 index cb24f44e..00000000 --- a/.kokoro/presubmit/java7.cfg +++ /dev/null @@ -1,7 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java7" -} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg deleted file mode 100644 index cb766dbe..00000000 --- a/.kokoro/presubmit/java8-osx.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-binary-authorization/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg deleted file mode 100644 index ca60e33b..00000000 --- a/.kokoro/presubmit/java8-win.cfg +++ /dev/null @@ -1,3 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -build_file: "java-binary-authorization/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg deleted file mode 100644 index 495cc7ba..00000000 --- a/.kokoro/presubmit/java8.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "REPORT_COVERAGE" - value: "true" -} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg deleted file mode 100644 index 4c4a0971..00000000 --- a/.kokoro/presubmit/linkage-monitor.cfg +++ /dev/null @@ -1,12 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/linkage-monitor.sh" -} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg deleted file mode 100644 index 6d323c8a..00000000 --- a/.kokoro/presubmit/lint.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. - -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "lint" -} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg deleted file mode 100644 index 01e09600..00000000 --- a/.kokoro/presubmit/samples.cfg +++ /dev/null @@ -1,33 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -env_vars: { - key: "JOB_TYPE" - value: "samples" -} - -# TODO: remove this after we've migrated all tests and scripts -env_vars: { - key: "GCLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_CLOUD_PROJECT" - value: "java-docs-samples-testing" -} - -env_vars: { - key: "GOOGLE_APPLICATION_CREDENTIALS" - value: "secret_manager/java-docs-samples-service-account" -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "java-docs-samples-service-account" -} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh deleted file mode 100755 index a0a6e060..00000000 --- a/.kokoro/readme.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -cd ${KOKORO_ARTIFACTS_DIR}/github/java-binary-authorization - -# Disable buffering, so that the logs stream through. -export PYTHONUNBUFFERED=1 - -# Kokoro exposes this as a file, but the scripts expect just a plain variable. -export GITHUB_TOKEN=$(cat ${KOKORO_KEYSTORE_DIR}/73713_yoshi-automation-github-key) - -# Setup git credentials -echo "https://${GITHUB_TOKEN}:@github.com" >> ~/.git-credentials -git config --global credential.helper 'store --file ~/.git-credentials' - -python3.6 -m pip install git+https://github.com/googleapis/synthtool.git#egg=gcp-synthtool - -set +e -python3.6 -m autosynth.synth \ - --repository=googleapis/java-binary-authorization \ - --synth-file-name=.github/readme/synth.py \ - --metadata-path=.github/readme/synth.metadata \ - --pr-title="chore: regenerate README" \ - --branch-suffix="readme" - -# autosynth returns 28 to signal there are no changes -RETURN_CODE=$? -if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] -then - exit ${RETURN_CODE} -fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg deleted file mode 100644 index 726dcdac..00000000 --- a/.kokoro/release/bump_snapshot.cfg +++ /dev/null @@ -1,53 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/bump_snapshot.sh" -} - -# tokens used by release-please to keep an up-to-date release PR. -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-key-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-token-release-please" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "github-magic-proxy-url-release-please" - } - } -} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg deleted file mode 100644 index 8a423de1..00000000 --- a/.kokoro/release/common.cfg +++ /dev/null @@ -1,49 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "java-binary-authorization/.kokoro/trampoline.sh" - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java8" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-keyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-passphrase" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "maven-gpg-pubkeyring" - } - } -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 70247 - keyname: "sonatype-credentials" - } - } -} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh deleted file mode 100755 index 7f78ee41..00000000 --- a/.kokoro/release/common.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Get secrets from keystore and set and environment variables -setup_environment_secrets() { - export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) - export GPG_TTY=$(tty) - export GPG_HOMEDIR=/gpg - mkdir $GPG_HOMEDIR - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg - mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg - export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') - export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') -} - -create_settings_xml_file() { - echo " - - - ossrh - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-staging - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - - sonatype-nexus-snapshots - ${SONATYPE_USERNAME} - ${SONATYPE_PASSWORD} - - -" > $1 -} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg deleted file mode 100644 index 0c53e2c0..00000000 --- a/.kokoro/release/drop.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/drop.sh" -} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh deleted file mode 100755 index 742ec1a8..00000000 --- a/.kokoro/release/drop.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:drop -B \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg deleted file mode 100644 index 5dd5fc4d..00000000 --- a/.kokoro/release/promote.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/promote.sh" -} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh deleted file mode 100755 index 3cac3d8a..00000000 --- a/.kokoro/release/promote.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# STAGING_REPOSITORY_ID must be set -if [ -z "${STAGING_REPOSITORY_ID}" ]; then - echo "Missing STAGING_REPOSITORY_ID environment variable" - exit 1 -fi - -source $(dirname "$0")/common.sh - -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml \ - -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg deleted file mode 100644 index b6345fd8..00000000 --- a/.kokoro/release/publish_javadoc.cfg +++ /dev/null @@ -1,23 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" - -env_vars: { - key: "STAGING_BUCKET" - value: "docs-staging" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/publish_javadoc.sh" -} - - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh deleted file mode 100755 index b6e23166..00000000 --- a/.kokoro/release/publish_javadoc.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET}" ]]; then - echo "Need to set STAGING_BUCKET environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-cloud-binary-authorization -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# build the docs -mvn site -B -q - -pushd target/site/apidocs - -# create metadata -python3 -m docuploader create-metadata \ - --name ${NAME} \ - --version ${VERSION} \ - --language java - -# upload docs -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg deleted file mode 100644 index 04a7beac..00000000 --- a/.kokoro/release/publish_javadoc11.cfg +++ /dev/null @@ -1,30 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# cloud-rad production -env_vars: { - key: "STAGING_BUCKET_V2" - value: "docs-staging-v2" -} - -# Configure the docker image for kokoro-trampoline -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/java11" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/publish_javadoc11.sh" -} - -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "docuploader_service_account" - } - } -} - -# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh deleted file mode 100755 index ed0d06a3..00000000 --- a/.kokoro/release/publish_javadoc11.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash -# 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. - -set -eo pipefail - -if [[ -z "${CREDENTIALS}" ]]; then - CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account -fi - -if [[ -z "${STAGING_BUCKET_V2}" ]]; then - echo "Need to set STAGING_BUCKET_V2 environment variable" - exit 1 -fi - -# work from the git root directory -pushd $(dirname "$0")/../../ - -# install docuploader package -python3 -m pip install --require-hashes -r .kokoro/requirements.txt - -# compile all packages -mvn clean install -B -q -DskipTests=true - -export NAME=google-cloud-binary-authorization -export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) - -# cloud RAD generation -mvn clean javadoc:aggregate -B -q -P docFX -# include CHANGELOG -cp CHANGELOG.md target/docfx-yml/history.md - -pushd target/docfx-yml - -# create metadata -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 -python3 -m docuploader upload . \ - --credentials ${CREDENTIALS} \ - --staging-bucket ${STAGING_BUCKET_V2} \ - --destination-prefix docfx diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg deleted file mode 100644 index 5871ccab..00000000 --- a/.kokoro/release/snapshot.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/snapshot.sh" -} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh deleted file mode 100755 index 1f55b770..00000000 --- a/.kokoro/release/snapshot.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Copyright 2019 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -source $(dirname "$0")/common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -# ensure we're trying to push a snapshot (no-result returns non-zero exit code) -grep SNAPSHOT versions.txt - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -mvn clean deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg deleted file mode 100644 index 909ebce4..00000000 --- a/.kokoro/release/stage.cfg +++ /dev/null @@ -1,19 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/java-binary-authorization/.kokoro/release/stage.sh" -} - -# Need to save the properties file -action { - define_artifacts { - regex: "github/java-binary-authorization/target/nexus-staging/staging/*.properties" - strip_prefix: "github/java-binary-authorization" - } -} - -env_vars: { - key: "SECRET_MANAGER_KEYS" - value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" -} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh deleted file mode 100755 index 61e714d6..00000000 --- a/.kokoro/release/stage.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -eo pipefail - -# Start the releasetool reporter -requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) -python3 -m pip install --require-hashes -r $requirementsFile -python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script - -source $(dirname "$0")/common.sh -source $(dirname "$0")/../common.sh -MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml -pushd $(dirname "$0")/../../ - -setup_environment_secrets -create_settings_xml_file "settings.xml" - -# attempt to stage 3 times with exponential backoff (starting with 10 seconds) -retry_with_backoff 3 10 \ - mvn clean deploy -B \ - --settings ${MAVEN_SETTINGS_FILE} \ - -DskipTests=true \ - -Dclirr.skip=true \ - -DperformRelease=true \ - -Dgpg.executable=gpg \ - -Dgpg.passphrase=${GPG_PASSPHRASE} \ - -Dgpg.homedir=${GPG_HOMEDIR} - -if [[ -n "${AUTORELEASE_PR}" ]] -then - mvn nexus-staging:release -B \ - -DperformRelease=true \ - --settings=settings.xml -fi diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in deleted file mode 100644 index 6aa7cf2b..00000000 --- a/.kokoro/requirements.in +++ /dev/null @@ -1,33 +0,0 @@ -gcp-docuploader==0.6.3 -google-crc32c==1.3.0 -googleapis-common-protos==1.56.3 -gcp-releasetool==1.8.7 -cachetools==4.2.4 -cffi==1.15.1 -jeepney==0.7.1 -jinja2==3.0.3 -markupsafe==2.0.1 -keyring==23.4.1 -packaging==21.3 -protobuf==3.19.5 -pyjwt==2.4.0 -pyparsing==3.0.9 -pycparser==2.21 -pyperclip==1.8.2 -python-dateutil==2.8.2 -requests==2.27.1 -certifi==2022.9.24 -importlib-metadata==4.8.3 -zipp==3.6.0 -google_api_core==2.8.2 -google-cloud-storage==2.0.0 -google-resumable-media==2.3.3 -google-cloud-core==2.3.1 -typing-extensions==4.1.1 -urllib3==1.26.12 -zipp==3.6.0 -rsa==4.9 -six==1.16.0 -attrs==22.1.0 -google-auth==2.11.0 -idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt deleted file mode 100644 index 02ae42bb..00000000 --- a/.kokoro/requirements.txt +++ /dev/null @@ -1,456 +0,0 @@ -# -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: -# -# pip-compile --allow-unsafe --generate-hashes requirements.in -# -attrs==22.1.0 \ - --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ - --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c - # via - # -r requirements.in - # gcp-releasetool -cachetools==4.2.4 \ - --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ - --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 - # via - # -r requirements.in - # google-auth -certifi==2022.9.24 \ - --hash=sha256:0d9c601124e5a6ba9712dbc60d9c53c21e34f5f641fe83002317394311bdce14 \ - --hash=sha256:90c1a32f1d68f940488354e36370f6cca89f0f106db09518524c88d6ed83f382 - # via - # -r requirements.in - # requests -cffi==1.15.1 \ - --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ - --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ - --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ - --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ - --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ - --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ - --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ - --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ - --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ - --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ - --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ - --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ - --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ - --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ - --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ - --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ - --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ - --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ - --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ - --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ - --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ - --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ - --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ - --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ - --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ - --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ - --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ - --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ - --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ - --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ - --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ - --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ - --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ - --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ - --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ - --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ - --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ - --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ - --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ - --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ - --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ - --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ - --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ - --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ - --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ - --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ - --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ - --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ - --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ - --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ - --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ - --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ - --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ - --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ - --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ - --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ - --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ - --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ - --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ - --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ - --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ - --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ - --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ - --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 - # via - # -r requirements.in - # cryptography -charset-normalizer==2.0.12 \ - --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ - --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df - # via requests -click==8.0.4 \ - --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ - --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb - # via - # gcp-docuploader - # gcp-releasetool -colorlog==6.7.0 \ - --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ - --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 - # via gcp-docuploader -cryptography==38.0.1 \ - --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ - --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ - --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ - --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ - --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ - --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ - --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ - --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ - --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ - --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ - --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ - --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ - --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ - --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ - --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ - --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ - --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ - --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ - --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ - --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ - --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ - --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ - --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ - --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ - --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ - --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 - # via - # gcp-releasetool - # secretstorage -gcp-docuploader==0.6.3 \ - --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ - --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b - # via -r requirements.in -gcp-releasetool==1.8.7 \ - --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ - --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d - # via -r requirements.in -google-api-core==2.8.2 \ - --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ - --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 - # via - # -r requirements.in - # google-cloud-core - # google-cloud-storage -google-auth==2.11.0 \ - --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ - --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb - # via - # -r requirements.in - # gcp-releasetool - # google-api-core - # google-cloud-core - # google-cloud-storage -google-cloud-core==2.3.1 \ - --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ - --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 - # via - # -r requirements.in - # google-cloud-storage -google-cloud-storage==2.0.0 \ - --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ - --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 - # via - # -r requirements.in - # gcp-docuploader -google-crc32c==1.3.0 \ - --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ - --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ - --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ - --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ - --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ - --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ - --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ - --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ - --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ - --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ - --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ - --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ - --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ - --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ - --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ - --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ - --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ - --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ - --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ - --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ - --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ - --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ - --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ - --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ - --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ - --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ - --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ - --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ - --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ - --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ - --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ - --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ - --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ - --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ - --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ - --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ - --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ - --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ - --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ - --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ - --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ - --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ - --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 - # via - # -r requirements.in - # google-resumable-media -google-resumable-media==2.3.3 \ - --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ - --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 - # via - # -r requirements.in - # google-cloud-storage -googleapis-common-protos==1.56.3 \ - --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ - --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 - # via - # -r requirements.in - # google-api-core -idna==3.4 \ - --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ - --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 - # via - # -r requirements.in - # requests -importlib-metadata==4.8.3 \ - --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ - --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 - # via - # -r requirements.in - # keyring -jeepney==0.7.1 \ - --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ - --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f - # via - # -r requirements.in - # keyring - # secretstorage -jinja2==3.0.3 \ - --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ - --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 - # via - # -r requirements.in - # gcp-releasetool -keyring==23.4.1 \ - --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ - --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 - # via - # -r requirements.in - # gcp-releasetool -markupsafe==2.0.1 \ - --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ - --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ - --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ - --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ - --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ - --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ - --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ - --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ - --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ - --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ - --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ - --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ - --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ - --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ - --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ - --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ - --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ - --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ - --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ - --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ - --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ - --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ - --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ - --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ - --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ - --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ - --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ - --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ - --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ - --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ - --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ - --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ - --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ - --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ - --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ - --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ - --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ - --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ - --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ - --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ - --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ - --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ - --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ - --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ - --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ - --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ - --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ - --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ - --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ - --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ - --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ - --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ - --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ - --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ - --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ - --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ - --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ - --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ - --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ - --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ - --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ - --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ - --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ - --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ - --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ - --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ - --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ - --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ - --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 - # via - # -r requirements.in - # jinja2 -packaging==21.3 \ - --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ - --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 - # via - # -r requirements.in - # gcp-releasetool -protobuf==3.19.5 \ - --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ - --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ - --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ - --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ - --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ - --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ - --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ - --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ - --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ - --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ - --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ - --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ - --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ - --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ - --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ - --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ - --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ - --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ - --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ - --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ - --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ - --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ - --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ - --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ - --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ - --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de - # via - # -r requirements.in - # gcp-docuploader - # gcp-releasetool - # google-api-core - # google-cloud-storage - # googleapis-common-protos -pyasn1==0.4.8 \ - --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ - --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba - # via - # pyasn1-modules - # rsa -pyasn1-modules==0.2.8 \ - --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ - --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 - # via google-auth -pycparser==2.21 \ - --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ - --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 - # via - # -r requirements.in - # cffi -pyjwt==2.4.0 \ - --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ - --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba - # via - # -r requirements.in - # gcp-releasetool -pyparsing==3.0.9 \ - --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ - --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc - # via - # -r requirements.in - # packaging -pyperclip==1.8.2 \ - --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 - # via - # -r requirements.in - # gcp-releasetool -python-dateutil==2.8.2 \ - --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ - --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 - # via - # -r requirements.in - # gcp-releasetool -requests==2.27.1 \ - --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ - --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d - # via - # -r requirements.in - # gcp-releasetool - # google-api-core - # google-cloud-storage -rsa==4.9 \ - --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ - --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 - # via - # -r requirements.in - # google-auth -secretstorage==3.3.3 \ - --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ - --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 - # via keyring -six==1.16.0 \ - --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ - --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 - # via - # -r requirements.in - # gcp-docuploader - # google-auth - # python-dateutil -typing-extensions==4.1.1 \ - --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ - --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 - # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 - # via - # -r requirements.in - # requests -zipp==3.6.0 \ - --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ - --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc - # via - # -r requirements.in - # importlib-metadata diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh deleted file mode 100644 index 8b69b793..00000000 --- a/.kokoro/trampoline.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -# Copyright 2018 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -set -eo pipefail -# Always run the cleanup script, regardless of the success of bouncing into -# the container. -function cleanup() { - chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh - echo "cleanup"; -} -trap cleanup EXIT - -$(dirname $0)/populate-secrets.sh # Secret Manager secrets. -python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json deleted file mode 100644 index 7516b2d5..00000000 --- a/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_shortname": "binaryauthorization", - "name_pretty": "Binary Authorization", - "product_documentation": "https://cloud.google.com/binary-authorization/docs", - "api_description": " is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware", - "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-binary-authorization/latest/history", - "release_level": "stable", - "transport": "grpc", - "language": "java", - "repo": "googleapis/java-binary-authorization", - "repo_short": "java-binary-authorization", - "distribution_name": "com.google.cloud:google-cloud-binary-authorization", - "api_id": "binary-authorization.googleapis.com", - "requires_billing": true, - "codeowner_team": "@googleapis/aap-dpes", - "library_type": "GAPIC_AUTO" -} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 798bf0f0..00000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,338 +0,0 @@ -# Changelog - -## [1.2.8](https://github.com/googleapis/java-binary-authorization/compare/v1.2.7...v1.2.8) (2022-10-04) - - -### Bug Fixes - -* update protobuf to v3.21.7 ([7e92fc0](https://github.com/googleapis/java-binary-authorization/commit/7e92fc0b28f5b1bbf52e070e17431fb91d1666e8)) - - -### Documentation - -* [owlbot-java] samples do not need deploy plugin and deps upgrade ([#1583](https://github.com/googleapis/java-binary-authorization/issues/1583)) ([#273](https://github.com/googleapis/java-binary-authorization/issues/273)) ([20c56f3](https://github.com/googleapis/java-binary-authorization/commit/20c56f386d5516848c662473a377af35b8eb4930)) - - -### Dependencies - -* Update dependency cachetools to v5 ([#296](https://github.com/googleapis/java-binary-authorization/issues/296)) ([99775f2](https://github.com/googleapis/java-binary-authorization/commit/99775f2926da14724916464a2eb284fb188e17cf)) -* Update dependency certifi to v2022.9.24 ([#276](https://github.com/googleapis/java-binary-authorization/issues/276)) ([1640a69](https://github.com/googleapis/java-binary-authorization/commit/1640a694e1a93626b84746ffd3064abdd2a13e03)) -* Update dependency charset-normalizer to v2.1.1 ([#280](https://github.com/googleapis/java-binary-authorization/issues/280)) ([2e3f88a](https://github.com/googleapis/java-binary-authorization/commit/2e3f88acbb06f8a85486c33b260d75477f41a200)) -* Update dependency click to v8.1.3 ([#281](https://github.com/googleapis/java-binary-authorization/issues/281)) ([06784ed](https://github.com/googleapis/java-binary-authorization/commit/06784edc130cb1c12ba332c015cc3bc91bb94449)) -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#303](https://github.com/googleapis/java-binary-authorization/issues/303)) ([30f22c2](https://github.com/googleapis/java-binary-authorization/commit/30f22c2a2eee01a07c49b6c4063c0b0fb51d8c76)) -* Update dependency gcp-releasetool to v1.8.8 ([#277](https://github.com/googleapis/java-binary-authorization/issues/277)) ([628c44f](https://github.com/googleapis/java-binary-authorization/commit/628c44f5cd15373234fc9e74a24508b8c754bd38)) -* Update dependency google-api-core to v2.10.1 ([#282](https://github.com/googleapis/java-binary-authorization/issues/282)) ([8991507](https://github.com/googleapis/java-binary-authorization/commit/89915070e073b8b190871f9277b14aa9a83aff1a)) -* Update dependency google-auth to v2.12.0 ([#283](https://github.com/googleapis/java-binary-authorization/issues/283)) ([21a18c3](https://github.com/googleapis/java-binary-authorization/commit/21a18c3bdf9c3d8cb7b9373fb90bc877c7bc460b)) -* Update dependency google-cloud-core to v2.3.2 ([#278](https://github.com/googleapis/java-binary-authorization/issues/278)) ([7798d5b](https://github.com/googleapis/java-binary-authorization/commit/7798d5b247e4ce33234c3b021cd6f90bae0dab90)) -* Update dependency google-cloud-storage to v2.5.0 ([#284](https://github.com/googleapis/java-binary-authorization/issues/284)) ([9db78e3](https://github.com/googleapis/java-binary-authorization/commit/9db78e36ff0ec71f55c3a461d67ec88dc7438e2c)) -* Update dependency google-crc32c to v1.5.0 ([#285](https://github.com/googleapis/java-binary-authorization/issues/285)) ([11256f6](https://github.com/googleapis/java-binary-authorization/commit/11256f60434380193875a9de6a36175bb387963c)) -* Update dependency google-resumable-media to v2.4.0 ([#299](https://github.com/googleapis/java-binary-authorization/issues/299)) ([12ddbb9](https://github.com/googleapis/java-binary-authorization/commit/12ddbb97f55f9fbec37b40caa20c0ece53d1d177)) -* Update dependency googleapis-common-protos to v1.56.4 ([#279](https://github.com/googleapis/java-binary-authorization/issues/279)) ([9709b14](https://github.com/googleapis/java-binary-authorization/commit/9709b14bcabc8ef5283c9d902bfa54fb92f7bbf1)) -* Update dependency importlib-metadata to v4.12.0 ([#286](https://github.com/googleapis/java-binary-authorization/issues/286)) ([f51db10](https://github.com/googleapis/java-binary-authorization/commit/f51db100aa1becd3b3860dba462add09887f3dbb)) -* Update dependency jeepney to v0.8.0 ([#287](https://github.com/googleapis/java-binary-authorization/issues/287)) ([b951c37](https://github.com/googleapis/java-binary-authorization/commit/b951c37239b55920bfd89dedb96af7b1397a4caa)) -* Update dependency jinja2 to v3.1.2 ([#288](https://github.com/googleapis/java-binary-authorization/issues/288)) ([ffd2347](https://github.com/googleapis/java-binary-authorization/commit/ffd2347ba6a157110d0c4925df8979840ffc7197)) -* Update dependency keyring to v23.9.3 ([#289](https://github.com/googleapis/java-binary-authorization/issues/289)) ([7078803](https://github.com/googleapis/java-binary-authorization/commit/7078803a0cde79de542d292574aac2677835bae2)) -* Update dependency markupsafe to v2.1.1 ([#290](https://github.com/googleapis/java-binary-authorization/issues/290)) ([5469e46](https://github.com/googleapis/java-binary-authorization/commit/5469e46df1ac140ca4d308eeb43bfb41d341a72a)) -* Update dependency protobuf to v3.20.2 ([#291](https://github.com/googleapis/java-binary-authorization/issues/291)) ([9644c7f](https://github.com/googleapis/java-binary-authorization/commit/9644c7f679a786aaea6686eaf219142003f1ea11)) -* Update dependency protobuf to v3.20.3 ([#300](https://github.com/googleapis/java-binary-authorization/issues/300)) ([a5b20f7](https://github.com/googleapis/java-binary-authorization/commit/a5b20f7364ccf3e4c91bd86efd55c4e5b6eb15c7)) -* Update dependency protobuf to v4 ([#297](https://github.com/googleapis/java-binary-authorization/issues/297)) ([bc3ba5f](https://github.com/googleapis/java-binary-authorization/commit/bc3ba5f176dec003fe555becd1bce6e2cc415c29)) -* Update dependency pyjwt to v2.5.0 ([#292](https://github.com/googleapis/java-binary-authorization/issues/292)) ([5716f17](https://github.com/googleapis/java-binary-authorization/commit/5716f177c2f26190ec9ca6c6ccd0a321a75b553d)) -* Update dependency requests to v2.28.1 ([#293](https://github.com/googleapis/java-binary-authorization/issues/293)) ([9212623](https://github.com/googleapis/java-binary-authorization/commit/92126233c88c5d993c9d1b1402f103c65c3cb2bd)) -* Update dependency typing-extensions to v4.3.0 ([#294](https://github.com/googleapis/java-binary-authorization/issues/294)) ([496eed2](https://github.com/googleapis/java-binary-authorization/commit/496eed218c7fa57b1007e9f4c3977ea04d2f2bde)) -* Update dependency zipp to v3.8.1 ([#295](https://github.com/googleapis/java-binary-authorization/issues/295)) ([43a78ce](https://github.com/googleapis/java-binary-authorization/commit/43a78ce22a83ec39cdeca08d73be79bfd00c28fc)) - -## [1.2.7](https://github.com/googleapis/java-binary-authorization/compare/v1.2.6...v1.2.7) (2022-09-20) - - -### Dependencies - -* Update dependency io.grafeas:grafeas to v2.4.5 ([#269](https://github.com/googleapis/java-binary-authorization/issues/269)) ([8a9a66d](https://github.com/googleapis/java-binary-authorization/commit/8a9a66dcc9fd417fcaaa3d06c432a6e4a2f50347)) - -## [1.2.6](https://github.com/googleapis/java-binary-authorization/compare/v1.2.5...v1.2.6) (2022-09-15) - - -### Dependencies - -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.3 ([#266](https://github.com/googleapis/java-binary-authorization/issues/266)) ([0ab7733](https://github.com/googleapis/java-binary-authorization/commit/0ab77337543942c8bdd5e9ae554790ca826931a8)) - -## [1.2.5](https://github.com/googleapis/java-binary-authorization/compare/v1.2.4...v1.2.5) (2022-09-10) - - -### Dependencies - -* Update dependency io.grafeas:grafeas to v2.4.4 ([#261](https://github.com/googleapis/java-binary-authorization/issues/261)) ([398de26](https://github.com/googleapis/java-binary-authorization/commit/398de26209ee8d1caad5fc949a76f97a94dfd88a)) - -## [1.2.4](https://github.com/googleapis/java-binary-authorization/compare/v1.2.3...v1.2.4) (2022-09-09) - - -### Dependencies - -* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.2 ([#258](https://github.com/googleapis/java-binary-authorization/issues/258)) ([4c82113](https://github.com/googleapis/java-binary-authorization/commit/4c821131fc5a8aed8f9e86231115c6f1d283b512)) - -## [1.2.3](https://github.com/googleapis/java-binary-authorization/compare/v1.2.2...v1.2.3) (2022-08-11) - - -### Bug Fixes - -* grafeas is runtime scope ([#251](https://github.com/googleapis/java-binary-authorization/issues/251)) ([f76e876](https://github.com/googleapis/java-binary-authorization/commit/f76e876facc17319638bbc4b87f19941a5acc707)) - -## [1.2.2](https://github.com/googleapis/java-binary-authorization/compare/v1.2.1...v1.2.2) (2022-08-04) - - -### Bug Fixes - -* enable longpaths support for windows test ([#1485](https://github.com/googleapis/java-binary-authorization/issues/1485)) ([#242](https://github.com/googleapis/java-binary-authorization/issues/242)) ([8a01271](https://github.com/googleapis/java-binary-authorization/commit/8a01271a54b1160e22cfae302debe2e441cd6485)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v3 ([#247](https://github.com/googleapis/java-binary-authorization/issues/247)) ([3e9ea1f](https://github.com/googleapis/java-binary-authorization/commit/3e9ea1fb7924148601cef4788cfe7d36543939b3)) - -## [1.2.1](https://github.com/googleapis/java-binary-authorization/compare/v1.2.0...v1.2.1) (2022-07-11) - - -### Dependencies - -* update dependency io.grafeas:grafeas to v2.4.0 ([#238](https://github.com/googleapis/java-binary-authorization/issues/238)) ([1854de1](https://github.com/googleapis/java-binary-authorization/commit/1854de1c74be723deab967e15708de1b20aaaa94)) - -## [1.2.0](https://github.com/googleapis/java-binary-authorization/compare/v1.1.1...v1.2.0) (2022-07-01) - - -### Features - -* Adds a pod_namespace field to pod events created by Continuous Validation, to distinguish pods with the same name that run in different namespaces ([#227](https://github.com/googleapis/java-binary-authorization/issues/227)) ([4755125](https://github.com/googleapis/java-binary-authorization/commit/4755125936bcf5931ea01e01e9fc6af3a7c1c309)) -* Enable REST transport for most of Java and Go clients ([#230](https://github.com/googleapis/java-binary-authorization/issues/230)) ([ca507e6](https://github.com/googleapis/java-binary-authorization/commit/ca507e6aca8a35467d95038d7554c0c5f357315a)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.13.0 ([#229](https://github.com/googleapis/java-binary-authorization/issues/229)) ([c5d1f10](https://github.com/googleapis/java-binary-authorization/commit/c5d1f103196a5d538e115d48f3873901fa0a065a)) -* update dependency io.grafeas:grafeas to v2.3.1 ([#231](https://github.com/googleapis/java-binary-authorization/issues/231)) ([7374554](https://github.com/googleapis/java-binary-authorization/commit/73745540d6187af67f8fdd1029485a860c45d7a7)) - -### [1.1.1](https://github.com/googleapis/java-binary-authorization/compare/v1.1.0...v1.1.1) (2022-05-26) - - -### Dependencies - -* update dependency io.grafeas:grafeas to v2.3.0 ([#217](https://github.com/googleapis/java-binary-authorization/issues/217)) ([901141f](https://github.com/googleapis/java-binary-authorization/commit/901141fe7bb7250a14b1f8fd76d66b2be2331d45)) - -## [1.1.0](https://github.com/googleapis/java-binary-authorization/compare/v1.0.9...v1.1.0) (2022-05-23) - - -### Features - -* add build scripts for native image testing in Java 17 ([#1440](https://github.com/googleapis/java-binary-authorization/issues/1440)) ([#215](https://github.com/googleapis/java-binary-authorization/issues/215)) ([ba4ef80](https://github.com/googleapis/java-binary-authorization/commit/ba4ef80044ffcabba2d711ca2cb0e2c44ebbaded)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.12.0 ([#214](https://github.com/googleapis/java-binary-authorization/issues/214)) ([5d78ffc](https://github.com/googleapis/java-binary-authorization/commit/5d78ffc34c861786e73eb212f879065a6d7acf4a)) - -### [1.0.9](https://github.com/googleapis/java-binary-authorization/compare/v1.0.8...v1.0.9) (2022-04-18) - - -### Dependencies - -* update dependency io.grafeas:grafeas to v2.2.4 ([#204](https://github.com/googleapis/java-binary-authorization/issues/204)) ([fc7b2e7](https://github.com/googleapis/java-binary-authorization/commit/fc7b2e780fe7f50ba308fa1dbdd7b664d82d595b)) - -### [1.0.8](https://github.com/googleapis/java-binary-authorization/compare/v1.0.7...v1.0.8) (2022-04-15) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.10.0 ([#201](https://github.com/googleapis/java-binary-authorization/issues/201)) ([16f72c6](https://github.com/googleapis/java-binary-authorization/commit/16f72c626da902a9bb37f6254361b8598bd78dc5)) - -### [1.0.7](https://github.com/googleapis/java-binary-authorization/compare/v1.0.6...v1.0.7) (2022-04-08) - - -### Dependencies - -* update dependency io.grafeas:grafeas to v2.2.3 ([#195](https://github.com/googleapis/java-binary-authorization/issues/195)) ([f1e6d1d](https://github.com/googleapis/java-binary-authorization/commit/f1e6d1da541d3fe271cb7ee8a615a9570eb152d8)) - -### [1.0.6](https://github.com/googleapis/java-binary-authorization/compare/v1.0.5...v1.0.6) (2022-03-29) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.9.0 ([#191](https://github.com/googleapis/java-binary-authorization/issues/191)) ([ae597c5](https://github.com/googleapis/java-binary-authorization/commit/ae597c542da60fc292fe1d204ccef07ad23221f7)) - -### [1.0.5](https://github.com/googleapis/java-binary-authorization/compare/v1.0.4...v1.0.5) (2022-03-24) - - -### Dependencies - -* update actions/checkout action to v3 ([#176](https://github.com/googleapis/java-binary-authorization/issues/176)) ([426f970](https://github.com/googleapis/java-binary-authorization/commit/426f9702ca98b4758ffe9c44f3fc4ca0f83ef92d)) - -### [1.0.4](https://github.com/googleapis/java-binary-authorization/compare/v1.0.3...v1.0.4) (2022-03-08) - - -### Dependencies - -* update dependency io.grafeas:grafeas to v2.2.2 ([#183](https://github.com/googleapis/java-binary-authorization/issues/183)) ([6b442fa](https://github.com/googleapis/java-binary-authorization/commit/6b442faa0b0e565094885cce27dec91fa2c65633)) - -### [1.0.3](https://github.com/googleapis/java-binary-authorization/compare/v1.0.2...v1.0.3) (2022-03-02) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.8.0 ([#178](https://github.com/googleapis/java-binary-authorization/issues/178)) ([6bff3c1](https://github.com/googleapis/java-binary-authorization/commit/6bff3c1e1b62f5f3d9b8470a5db211086e414dfa)) - -### [1.0.2](https://github.com/googleapis/java-binary-authorization/compare/v1.0.1...v1.0.2) (2022-02-28) - - -### Dependencies - -* update actions/setup-java action to v3 ([#171](https://github.com/googleapis/java-binary-authorization/issues/171)) ([c2b4c8e](https://github.com/googleapis/java-binary-authorization/commit/c2b4c8e1ae4dcca04f045b00fd005e4d27ab6b09)) -* update dependency io.grafeas:grafeas to v2.2.1 ([#170](https://github.com/googleapis/java-binary-authorization/issues/170)) ([d4bce7e](https://github.com/googleapis/java-binary-authorization/commit/d4bce7eabf6f25a4d9fe044b1ffd1d2ed7b03434)) - -### [1.0.1](https://github.com/googleapis/java-binary-authorization/compare/v1.0.0...v1.0.1) (2022-02-11) - - -### Dependencies - -* update actions/github-script action to v6 ([#163](https://github.com/googleapis/java-binary-authorization/issues/163)) ([ea8ee5c](https://github.com/googleapis/java-binary-authorization/commit/ea8ee5c3c26a1c2558c2d7d2d414a60686e39c8a)) - -## [1.0.0](https://github.com/googleapis/java-binary-authorization/compare/v0.4.1...v1.0.0) (2022-02-03) - - -### Features - -* promote to GA ([#147](https://github.com/googleapis/java-binary-authorization/issues/147)) ([f64e755](https://github.com/googleapis/java-binary-authorization/commit/f64e75577b3cb30db219ee19134e7d02abf0ecc3)) - - -### Dependencies - -* **java:** update actions/github-script action to v5 ([#1339](https://github.com/googleapis/java-binary-authorization/issues/1339)) ([#151](https://github.com/googleapis/java-binary-authorization/issues/151)) ([6ef4a2c](https://github.com/googleapis/java-binary-authorization/commit/6ef4a2ca0a4673ae5b0788d28e45bafe6d361803)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.7.0 ([#154](https://github.com/googleapis/java-binary-authorization/issues/154)) ([010fea6](https://github.com/googleapis/java-binary-authorization/commit/010fea6e7fda31e4c9bc5642560340831337d3ae)) -* update dependency io.grafeas:grafeas to v2.2.0 ([#138](https://github.com/googleapis/java-binary-authorization/issues/138)) ([1d0e567](https://github.com/googleapis/java-binary-authorization/commit/1d0e567bee55a6eff0daa831449e3f090a22981b)) - -### [0.4.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.4.0...v0.4.1) (2022-01-07) - - -### Bug Fixes - -* **java:** run Maven in plain console-friendly mode ([#1301](https://www.github.com/googleapis/java-binary-authorization/issues/1301)) ([#131](https://www.github.com/googleapis/java-binary-authorization/issues/131)) ([0fd5b44](https://www.github.com/googleapis/java-binary-authorization/commit/0fd5b4439f807c37f56695c63b81693be8e5fbc1)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.6.0 ([#134](https://www.github.com/googleapis/java-binary-authorization/issues/134)) ([cc6736a](https://www.github.com/googleapis/java-binary-authorization/commit/cc6736a38ecbb1d0ec96b8a1f0b6ca828f9ed1c9)) - -## [0.4.0](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.3...v0.4.0) (2021-12-06) - - -### Features - -* add new admission rule types to Policy feat: update SignatureAlgorithm enum to match algorithm names in KMS feat: add SystemPolicyV1Beta1 service ([#112](https://www.github.com/googleapis/java-binary-authorization/issues/112)) ([fceee93](https://www.github.com/googleapis/java-binary-authorization/commit/fceee93149a3576c32cbca171882910f05fd7e2d)) -* binaryauthorization v1 public protos ([#90](https://www.github.com/googleapis/java-binary-authorization/issues/90)) ([f5315fc](https://www.github.com/googleapis/java-binary-authorization/commit/f5315fcb4761ac78e0b66945a8ee3b6d6f5e85eb)) - - -### Bug Fixes - -* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-binary-authorization/issues/1299)) ([#126](https://www.github.com/googleapis/java-binary-authorization/issues/126)) ([1fd688a](https://www.github.com/googleapis/java-binary-authorization/commit/1fd688a59ed534255191e4b8ab2753a4750e2e8c)) -* **java:** java 17 dependency arguments ([#1266](https://www.github.com/googleapis/java-binary-authorization/issues/1266)) ([#107](https://www.github.com/googleapis/java-binary-authorization/issues/107)) ([47a899b](https://www.github.com/googleapis/java-binary-authorization/commit/47a899b73033fd800d7671bd6d9d7e5575831ab8)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.0 ([#118](https://www.github.com/googleapis/java-binary-authorization/issues/118)) ([6f13f2a](https://www.github.com/googleapis/java-binary-authorization/commit/6f13f2ac75045e07ce127a6423f69e9224b1721e)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.5.1 ([#124](https://www.github.com/googleapis/java-binary-authorization/issues/124)) ([c75a6ac](https://www.github.com/googleapis/java-binary-authorization/commit/c75a6ac8ac2393d630046e69a3626ce64301dac9)) -* update dependency io.grafeas:grafeas to v2.1.0 ([#108](https://www.github.com/googleapis/java-binary-authorization/issues/108)) ([1853da6](https://www.github.com/googleapis/java-binary-authorization/commit/1853da6f67619f4f74db0948e82685f2147d18ae)) -* update dependency io.grafeas:grafeas to v2.1.1 ([#109](https://www.github.com/googleapis/java-binary-authorization/issues/109)) ([1ebd94b](https://www.github.com/googleapis/java-binary-authorization/commit/1ebd94b6cbf7518f806db8fd8c846507173a4c8b)) -* update dependency io.grafeas:grafeas to v2.1.2 ([#119](https://www.github.com/googleapis/java-binary-authorization/issues/119)) ([f38a45b](https://www.github.com/googleapis/java-binary-authorization/commit/f38a45bac205d85251c9c968d39dd0d4a10c0e57)) -* update dependency io.grafeas:grafeas to v2.1.3 ([#125](https://www.github.com/googleapis/java-binary-authorization/issues/125)) ([1bc6eb9](https://www.github.com/googleapis/java-binary-authorization/commit/1bc6eb94978eae34a5e1a28a1d9067fad47596de)) - -### [0.3.3](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.2...v0.3.3) (2021-10-19) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.4.0 ([#101](https://www.github.com/googleapis/java-binary-authorization/issues/101)) ([3f592b5](https://www.github.com/googleapis/java-binary-authorization/commit/3f592b5bd92410c7afa40e166ea26012cad26648)) - -### [0.3.2](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.1...v0.3.2) (2021-09-22) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.3.0 ([#87](https://www.github.com/googleapis/java-binary-authorization/issues/87)) ([e801b46](https://www.github.com/googleapis/java-binary-authorization/commit/e801b46bc4862105f99ae95424fe393fb08e9a61)) - -### [0.3.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.3.0...v0.3.1) (2021-09-14) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.1 ([#80](https://www.github.com/googleapis/java-binary-authorization/issues/80)) ([9043edc](https://www.github.com/googleapis/java-binary-authorization/commit/9043edc5244823b6b6dacd38e5f346cdc963cf5d)) - -## [0.3.0](https://www.github.com/googleapis/java-binary-authorization/compare/v0.2.2...v0.3.0) (2021-09-10) - - -### Features - -* Remove use of deprecated gradle command in java README ([#1196](https://www.github.com/googleapis/java-binary-authorization/issues/1196)) ([#65](https://www.github.com/googleapis/java-binary-authorization/issues/65)) ([8cb0da3](https://www.github.com/googleapis/java-binary-authorization/commit/8cb0da37f9c387a79c9255bca3402ec22643ded8)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.2.0 ([#69](https://www.github.com/googleapis/java-binary-authorization/issues/69)) ([4843a90](https://www.github.com/googleapis/java-binary-authorization/commit/4843a904a0e402ed6ae9677e940faec9f1d1f71e)) - -### [0.2.2](https://www.github.com/googleapis/java-binary-authorization/compare/v0.2.1...v0.2.2) (2021-08-23) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.1.0 ([#59](https://www.github.com/googleapis/java-binary-authorization/issues/59)) ([4a04949](https://www.github.com/googleapis/java-binary-authorization/commit/4a04949edb28e1db63b565d07b30d2308d2ad4f2)) - -### [0.2.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.2.0...v0.2.1) (2021-08-12) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2.0.1 ([#53](https://www.github.com/googleapis/java-binary-authorization/issues/53)) ([dfdd993](https://www.github.com/googleapis/java-binary-authorization/commit/dfdd9932eee97318d4aa74b45106b83faedd323f)) - -## [0.2.0](https://www.github.com/googleapis/java-binary-authorization/compare/v0.1.1...v0.2.0) (2021-08-09) - - -### ⚠ BREAKING CHANGES - -* release gapic-generator-java v2.0.0 (#47) - -### Features - -* release gapic-generator-java v2.0.0 ([#47](https://www.github.com/googleapis/java-binary-authorization/issues/47)) ([6e8fd4b](https://www.github.com/googleapis/java-binary-authorization/commit/6e8fd4b1fb93b8075af8c2536655e7d213c1622a)) - - -### Bug Fixes - -* Add `shopt -s nullglob` to dependencies script ([#1130](https://www.github.com/googleapis/java-binary-authorization/issues/1130)) ([#26](https://www.github.com/googleapis/java-binary-authorization/issues/26)) ([0b7ea96](https://www.github.com/googleapis/java-binary-authorization/commit/0b7ea968aedb1824a84e1a9abd35feae17ee3b3b)) -* owlbot post-processor should generate README ([#1154](https://www.github.com/googleapis/java-binary-authorization/issues/1154)) ([#31](https://www.github.com/googleapis/java-binary-authorization/issues/31)) ([d40ffa2](https://www.github.com/googleapis/java-binary-authorization/commit/d40ffa289be02aa3e6bcfe9c50d688e2905addd1)), closes [#1146](https://www.github.com/googleapis/java-binary-authorization/issues/1146) [#1147](https://www.github.com/googleapis/java-binary-authorization/issues/1147) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.4.0 ([#28](https://www.github.com/googleapis/java-binary-authorization/issues/28)) ([4dda105](https://www.github.com/googleapis/java-binary-authorization/commit/4dda105fe56704810a5157afd17af47aadb4e67e)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v2 ([#48](https://www.github.com/googleapis/java-binary-authorization/issues/48)) ([c069652](https://www.github.com/googleapis/java-binary-authorization/commit/c06965200207f3784ff1517c8e5da7275649d254)) - - -### Documentation - -* Replace "global policy" with "system policy" in Binary Authorization documentation ([#45](https://www.github.com/googleapis/java-binary-authorization/issues/45)) ([7ee7f88](https://www.github.com/googleapis/java-binary-authorization/commit/7ee7f88b06bd51c018f7e43b28b415b069d92ccd)) - -### [0.1.1](https://www.github.com/googleapis/java-binary-authorization/compare/v0.1.0...v0.1.1) (2021-06-09) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1.3.0 ([#16](https://www.github.com/googleapis/java-binary-authorization/issues/16)) ([5221465](https://www.github.com/googleapis/java-binary-authorization/commit/522146545b9f56a65a87a282f7bb057c626a6b47)) - -## 0.1.0 (2021-06-03) - - -### Features - -* initial generation ([24afde1](https://www.github.com/googleapis/java-binary-authorization/commit/24afde139af21fbe16d6b8ebe949ab3b3dfd66d5)) - - -### Dependencies - -* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.21.1 ([#8](https://www.github.com/googleapis/java-binary-authorization/issues/8)) ([b041dc9](https://www.github.com/googleapis/java-binary-authorization/commit/b041dc9dec1919fabb3110a6480543f6dbf3c0b6)) -* update dependency com.google.cloud:google-cloud-shared-dependencies to v1 ([#10](https://www.github.com/googleapis/java-binary-authorization/issues/10)) ([4ae303c](https://www.github.com/googleapis/java-binary-authorization/commit/4ae303c0e43747dc6dcc2619b82b7889d8dd9028)) diff --git a/codecov.yaml b/codecov.yaml deleted file mode 100644 index 5724ea94..00000000 --- a/codecov.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -codecov: - ci: - - source.cloud.google.com diff --git a/google-cloud-binary-authorization-bom/pom.xml b/google-cloud-binary-authorization-bom/pom.xml deleted file mode 100644 index 4e334cf1..00000000 --- a/google-cloud-binary-authorization-bom/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-binary-authorization-bom - 1.2.9-SNAPSHOT - pom - - com.google.cloud - google-cloud-shared-config - 1.5.3 - - - Google Binary Authorization BOM - https://github.com/googleapis/java-binary-authorization - - BOM for Binary Authorization - - - - Google LLC - - - - - chingor13 - Jeff Ching - chingor@google.com - Google LLC - - Developer - - - - - - scm:git:https://github.com/googleapis/java-binary-authorization.git - scm:git:git@github.com:googleapis/java-binary-authorization.git - https://github.com/googleapis/java-binary-authorization - - - - true - - - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - - - com.google.cloud - google-cloud-binary-authorization - 1.2.9-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - - - - - - - - org.apache.maven.plugins - maven-checkstyle-plugin - - true - - - - - diff --git a/google-cloud-binary-authorization/pom.xml b/google-cloud-binary-authorization/pom.xml deleted file mode 100644 index 2f6fadcc..00000000 --- a/google-cloud-binary-authorization/pom.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-binary-authorization - 1.2.9-SNAPSHOT - jar - Google Binary Authorization - https://github.com/googleapis/java-binary-authorization - Binary Authorization is a service on Google Cloud that provides centralized software supply-chain security for applications that run on Google Kubernetes Engine (GKE) and Anthos clusters on VMware - - com.google.cloud - google-cloud-binary-authorization-parent - 1.2.9-SNAPSHOT - - - google-cloud-binary-authorization - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.api - api-common - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1 - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1beta1 - - - com.google.guava - guava - - - com.google.api - gax - - - com.google.api - gax-grpc - - - com.google.api - gax-httpjson - - - org.threeten - threetenbp - - - io.grafeas - grafeas - runtime - - - - - junit - junit - test - 4.13.2 - - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1beta1 - test - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1 - test - - - - com.google.api - gax - testlib - test - - - com.google.api - gax-grpc - testlib - test - - - com.google.api - gax-httpjson - testlib - test - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java deleted file mode 100644 index 11c203f6..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Client.java +++ /dev/null @@ -1,1209 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -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.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1Stub; -import com.google.cloud.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1StubSettings; -import com.google.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Google Cloud Management Service for Binary Authorization admission policies - * and attestation authorities. - * - *

This API implements a REST model with the following objects: - * - *

    - *
  • [Policy][google.cloud.binaryauthorization.v1beta1.Policy] - *
  • [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] - *
- * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
- *     BinauthzManagementServiceV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
- *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
- *     BinauthzManagementServiceV1Beta1Settings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
- *     BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
- *     BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
- * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
- *     BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
- *     BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder().build();
- * BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
- *     BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1Beta1Client implements BackgroundResource { - private final BinauthzManagementServiceV1Beta1Settings settings; - private final BinauthzManagementServiceV1Beta1Stub stub; - - /** Constructs an instance of BinauthzManagementServiceV1Beta1Client with default settings. */ - public static final BinauthzManagementServiceV1Beta1Client create() throws IOException { - return create(BinauthzManagementServiceV1Beta1Settings.newBuilder().build()); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Beta1Client, 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 BinauthzManagementServiceV1Beta1Client create( - BinauthzManagementServiceV1Beta1Settings settings) throws IOException { - return new BinauthzManagementServiceV1Beta1Client(settings); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Beta1Client, using the given stub for - * making calls. This is for advanced usage - prefer using - * create(BinauthzManagementServiceV1Beta1Settings). - */ - public static final BinauthzManagementServiceV1Beta1Client create( - BinauthzManagementServiceV1Beta1Stub stub) { - return new BinauthzManagementServiceV1Beta1Client(stub); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Beta1Client, 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 BinauthzManagementServiceV1Beta1Client( - BinauthzManagementServiceV1Beta1Settings settings) throws IOException { - this.settings = settings; - this.stub = - ((BinauthzManagementServiceV1Beta1StubSettings) settings.getStubSettings()).createStub(); - } - - protected BinauthzManagementServiceV1Beta1Client(BinauthzManagementServiceV1Beta1Stub stub) { - this.settings = null; - this.stub = stub; - } - - public final BinauthzManagementServiceV1Beta1Settings getSettings() { - return settings; - } - - public BinauthzManagementServiceV1Beta1Stub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns - * a default [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not - * have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
-   *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the - * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in the format - * `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy getPolicy(PolicyName name) { - GetPolicyRequest request = - GetPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns - * a default [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not - * have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
-   *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the - * [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, in the format - * `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy getPolicy(String name) { - GetPolicyRequest request = GetPolicyRequest.newBuilder().setName(name).build(); - return getPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns - * a default [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not - * have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   GetPolicyRequest request =
-   *       GetPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
-   *           .build();
-   *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(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 Policy getPolicy(GetPolicyRequest request) { - return getPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns - * a default [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not - * have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   GetPolicyRequest request =
-   *       GetPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.getPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getPolicyCallable() { - return stub.getPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy - * is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   Policy policy = Policy.newBuilder().build();
-   *   Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(policy);
-   * }
-   * }
- * - * @param policy Required. A new or updated - * [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will overwrite - * the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the - * resource name in the request URL, in the format `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy updatePolicy(Policy policy) { - UpdatePolicyRequest request = UpdatePolicyRequest.newBuilder().setPolicy(policy).build(); - return updatePolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy - * is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   UpdatePolicyRequest request =
-   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
-   *   Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(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 Policy updatePolicy(UpdatePolicyRequest request) { - return updatePolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy - * is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   UpdatePolicyRequest request =
-   *       UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.updatePolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updatePolicyCallable() { - return stub.updatePolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of - * the new [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String attestorId = "attestorId2055733027";
-   *   Attestor attestor = Attestor.newBuilder().build();
-   *   Attestor response =
-   *       binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor);
-   * }
-   * }
- * - * @param parent Required. The parent of this - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] - * ID. - * @param attestor Required. The initial - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field - * with the resource name, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Attestor createAttestor(ProjectName parent, String attestorId, Attestor attestor) { - CreateAttestorRequest request = - CreateAttestorRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setAttestorId(attestorId) - .setAttestor(attestor) - .build(); - return createAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of - * the new [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String attestorId = "attestorId2055733027";
-   *   Attestor attestor = Attestor.newBuilder().build();
-   *   Attestor response =
-   *       binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor);
-   * }
-   * }
- * - * @param parent Required. The parent of this - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] - * ID. - * @param attestor Required. The initial - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field - * with the resource name, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Attestor createAttestor(String parent, String attestorId, Attestor attestor) { - CreateAttestorRequest request = - CreateAttestorRequest.newBuilder() - .setParent(parent) - .setAttestorId(attestorId) - .setAttestor(attestor) - .build(); - return createAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of - * the new [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   CreateAttestorRequest request =
-   *       CreateAttestorRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setAttestorId("attestorId2055733027")
-   *           .setAttestor(Attestor.newBuilder().build())
-   *           .build();
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.createAttestor(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 Attestor createAttestor(CreateAttestorRequest request) { - return createAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of - * the new [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * project does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   CreateAttestorRequest request =
-   *       CreateAttestorRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setAttestorId("attestorId2055733027")
-   *           .setAttestor(Attestor.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.createAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable createAttestorCallable() { - return stub.createAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Attestor getAttestor(AttestorName name) { - GetAttestorRequest request = - GetAttestorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format - * `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Attestor getAttestor(String name) { - GetAttestorRequest request = GetAttestorRequest.newBuilder().setName(name).build(); - return getAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   GetAttestorRequest request =
-   *       GetAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(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 Attestor getAttestor(GetAttestorRequest request) { - return getAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   GetAttestorRequest request =
-   *       GetAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.getAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getAttestorCallable() { - return stub.getAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   Attestor attestor = Attestor.newBuilder().build();
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(attestor);
-   * }
-   * }
- * - * @param attestor Required. The updated - * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will - * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field - * with the resource name in the request URL, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Attestor updateAttestor(Attestor attestor) { - UpdateAttestorRequest request = - UpdateAttestorRequest.newBuilder().setAttestor(attestor).build(); - return updateAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   UpdateAttestorRequest request =
-   *       UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build();
-   *   Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(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 Attestor updateAttestor(UpdateAttestorRequest request) { - return updateAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   UpdateAttestorRequest request =
-   *       UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.updateAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updateAttestorCallable() { - return stub.updateAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns INVALID_ARGUMENT - * if the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (Attestor element :
-   *       binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format - * `projects/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAttestorsPagedResponse listAttestors(ProjectName parent) { - ListAttestorsRequest request = - ListAttestorsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listAttestors(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns INVALID_ARGUMENT - * if the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   for (Attestor element :
-   *       binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format - * `projects/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAttestorsPagedResponse listAttestors(String parent) { - ListAttestorsRequest request = ListAttestorsRequest.newBuilder().setParent(parent).build(); - return listAttestors(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns INVALID_ARGUMENT - * if the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   ListAttestorsRequest request =
-   *       ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Attestor element :
-   *       binauthzManagementServiceV1Beta1Client.listAttestors(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 ListAttestorsPagedResponse listAttestors(ListAttestorsRequest request) { - return listAttestorsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns INVALID_ARGUMENT - * if the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   ListAttestorsRequest request =
-   *       ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.listAttestorsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Attestor element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listAttestorsPagedCallable() { - return stub.listAttestorsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns INVALID_ARGUMENT - * if the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   ListAttestorsRequest request =
-   *       ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     ListAttestorsResponse response =
-   *         binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request);
-   *     for (Attestor element : response.getAttestorsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable listAttestorsCallable() { - return stub.listAttestorsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
-   *   binauthzManagementServiceV1Beta1Client.deleteAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAttestor(AttestorName name) { - DeleteAttestorRequest request = - DeleteAttestorRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - deleteAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
-   *   binauthzManagementServiceV1Beta1Client.deleteAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the - * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format - * `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAttestor(String name) { - DeleteAttestorRequest request = DeleteAttestorRequest.newBuilder().setName(name).build(); - deleteAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   DeleteAttestorRequest request =
-   *       DeleteAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   binauthzManagementServiceV1Beta1Client.deleteAttestor(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 deleteAttestor(DeleteAttestorRequest request) { - deleteAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if - * the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
-   *     BinauthzManagementServiceV1Beta1Client.create()) {
-   *   DeleteAttestorRequest request =
-   *       DeleteAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Beta1Client.deleteAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteAttestorCallable() { - return stub.deleteAttestorCallable(); - } - - @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 ListAttestorsPagedResponse - extends AbstractPagedListResponse< - ListAttestorsRequest, - ListAttestorsResponse, - Attestor, - ListAttestorsPage, - ListAttestorsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAttestorsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListAttestorsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListAttestorsPagedResponse(ListAttestorsPage page) { - super(page, ListAttestorsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAttestorsPage - extends AbstractPage< - ListAttestorsRequest, ListAttestorsResponse, Attestor, ListAttestorsPage> { - - private ListAttestorsPage( - PageContext context, - ListAttestorsResponse response) { - super(context, response); - } - - private static ListAttestorsPage createEmptyPage() { - return new ListAttestorsPage(null, null); - } - - @Override - protected ListAttestorsPage createPage( - PageContext context, - ListAttestorsResponse response) { - return new ListAttestorsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAttestorsFixedSizeCollection - extends AbstractFixedSizeCollection< - ListAttestorsRequest, - ListAttestorsResponse, - Attestor, - ListAttestorsPage, - ListAttestorsFixedSizeCollection> { - - private ListAttestorsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAttestorsFixedSizeCollection createEmptyCollection() { - return new ListAttestorsFixedSizeCollection(null, 0); - } - - @Override - protected ListAttestorsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAttestorsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java deleted file mode 100644 index 797d50d7..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Settings.java +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -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.httpjson.InstantiatingHttpJsonChannelProvider; -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.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1StubSettings; -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 BinauthzManagementServiceV1Beta1Client}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Beta1Settings.Builder
- *     binauthzManagementServiceV1Beta1SettingsBuilder =
- *         BinauthzManagementServiceV1Beta1Settings.newBuilder();
- * binauthzManagementServiceV1Beta1SettingsBuilder
- *     .getPolicySettings()
- *     .setRetrySettings(
- *         binauthzManagementServiceV1Beta1SettingsBuilder
- *             .getPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings =
- *     binauthzManagementServiceV1Beta1SettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1Beta1Settings - extends ClientSettings { - - /** Returns the object with the settings used for calls to getPolicy. */ - public UnaryCallSettings getPolicySettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()).getPolicySettings(); - } - - /** Returns the object with the settings used for calls to updatePolicy. */ - public UnaryCallSettings updatePolicySettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()) - .updatePolicySettings(); - } - - /** Returns the object with the settings used for calls to createAttestor. */ - public UnaryCallSettings createAttestorSettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()) - .createAttestorSettings(); - } - - /** Returns the object with the settings used for calls to getAttestor. */ - public UnaryCallSettings getAttestorSettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()).getAttestorSettings(); - } - - /** Returns the object with the settings used for calls to updateAttestor. */ - public UnaryCallSettings updateAttestorSettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()) - .updateAttestorSettings(); - } - - /** Returns the object with the settings used for calls to listAttestors. */ - public PagedCallSettings - listAttestorsSettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()) - .listAttestorsSettings(); - } - - /** Returns the object with the settings used for calls to deleteAttestor. */ - public UnaryCallSettings deleteAttestorSettings() { - return ((BinauthzManagementServiceV1Beta1StubSettings) getStubSettings()) - .deleteAttestorSettings(); - } - - public static final BinauthzManagementServiceV1Beta1Settings create( - BinauthzManagementServiceV1Beta1StubSettings stub) throws IOException { - return new BinauthzManagementServiceV1Beta1Settings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return BinauthzManagementServiceV1Beta1StubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return BinauthzManagementServiceV1Beta1StubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 BinauthzManagementServiceV1Beta1Settings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for BinauthzManagementServiceV1Beta1Settings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(BinauthzManagementServiceV1Beta1StubSettings.newBuilder(clientContext)); - } - - protected Builder(BinauthzManagementServiceV1Beta1Settings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(BinauthzManagementServiceV1Beta1StubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(BinauthzManagementServiceV1Beta1StubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder()); - } - - public BinauthzManagementServiceV1Beta1StubSettings.Builder getStubSettingsBuilder() { - return ((BinauthzManagementServiceV1Beta1StubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getPolicy. */ - public UnaryCallSettings.Builder getPolicySettings() { - return getStubSettingsBuilder().getPolicySettings(); - } - - /** Returns the builder for the settings used for calls to updatePolicy. */ - public UnaryCallSettings.Builder updatePolicySettings() { - return getStubSettingsBuilder().updatePolicySettings(); - } - - /** Returns the builder for the settings used for calls to createAttestor. */ - public UnaryCallSettings.Builder createAttestorSettings() { - return getStubSettingsBuilder().createAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to getAttestor. */ - public UnaryCallSettings.Builder getAttestorSettings() { - return getStubSettingsBuilder().getAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to updateAttestor. */ - public UnaryCallSettings.Builder updateAttestorSettings() { - return getStubSettingsBuilder().updateAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to listAttestors. */ - public PagedCallSettings.Builder< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return getStubSettingsBuilder().listAttestorsSettings(); - } - - /** Returns the builder for the settings used for calls to deleteAttestor. */ - public UnaryCallSettings.Builder deleteAttestorSettings() { - return getStubSettingsBuilder().deleteAttestorSettings(); - } - - @Override - public BinauthzManagementServiceV1Beta1Settings build() throws IOException { - return new BinauthzManagementServiceV1Beta1Settings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java deleted file mode 100644 index 3455dfc5..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Client.java +++ /dev/null @@ -1,312 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1Stub; -import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: API for working with the system policy. - * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
- *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
- *     SystemPolicyV1Beta1Settings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
- *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
- *     SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build();
- * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
- *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
- *     SystemPolicyV1Beta1Settings.newHttpJsonBuilder().build();
- * SystemPolicyV1Beta1Client systemPolicyV1Beta1Client =
- *     SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class SystemPolicyV1Beta1Client implements BackgroundResource { - private final SystemPolicyV1Beta1Settings settings; - private final SystemPolicyV1Beta1Stub stub; - - /** Constructs an instance of SystemPolicyV1Beta1Client with default settings. */ - public static final SystemPolicyV1Beta1Client create() throws IOException { - return create(SystemPolicyV1Beta1Settings.newBuilder().build()); - } - - /** - * Constructs an instance of SystemPolicyV1Beta1Client, 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 SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Settings settings) - throws IOException { - return new SystemPolicyV1Beta1Client(settings); - } - - /** - * Constructs an instance of SystemPolicyV1Beta1Client, using the given stub for making calls. - * This is for advanced usage - prefer using create(SystemPolicyV1Beta1Settings). - */ - public static final SystemPolicyV1Beta1Client create(SystemPolicyV1Beta1Stub stub) { - return new SystemPolicyV1Beta1Client(stub); - } - - /** - * Constructs an instance of SystemPolicyV1Beta1Client, 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 SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Settings settings) throws IOException { - this.settings = settings; - this.stub = ((SystemPolicyV1Beta1StubSettings) settings.getStubSettings()).createStub(); - } - - protected SystemPolicyV1Beta1Client(SystemPolicyV1Beta1Stub stub) { - this.settings = null; - this.stub = stub; - } - - public final SystemPolicyV1Beta1Settings getSettings() { - return settings; - } - - public SystemPolicyV1Beta1Stub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
-   *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
-   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name, in the format `locations/*/policy`. Note that the - * system policy is not associated with a project. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy getSystemPolicy(PolicyName name) { - GetSystemPolicyRequest request = - GetSystemPolicyRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return getSystemPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
-   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
-   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name, in the format `locations/*/policy`. Note that the - * system policy is not associated with a project. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Policy getSystemPolicy(String name) { - GetSystemPolicyRequest request = GetSystemPolicyRequest.newBuilder().setName(name).build(); - return getSystemPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
-   *   GetSystemPolicyRequest request =
-   *       GetSystemPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofLocationName("[LOCATION]").toString())
-   *           .build();
-   *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(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 Policy getSystemPolicy(GetSystemPolicyRequest request) { - return getSystemPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
-   *   GetSystemPolicyRequest request =
-   *       GetSystemPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofLocationName("[LOCATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getSystemPolicyCallable() { - return stub.getSystemPolicyCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java deleted file mode 100644 index 177285a3..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Settings.java +++ /dev/null @@ -1,208 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -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.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; -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 SystemPolicyV1Beta1Client}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder =
- *     SystemPolicyV1Beta1Settings.newBuilder();
- * systemPolicyV1Beta1SettingsBuilder
- *     .getSystemPolicySettings()
- *     .setRetrySettings(
- *         systemPolicyV1Beta1SettingsBuilder
- *             .getSystemPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings =
- *     systemPolicyV1Beta1SettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class SystemPolicyV1Beta1Settings extends ClientSettings { - - /** Returns the object with the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings getSystemPolicySettings() { - return ((SystemPolicyV1Beta1StubSettings) getStubSettings()).getSystemPolicySettings(); - } - - public static final SystemPolicyV1Beta1Settings create(SystemPolicyV1Beta1StubSettings stub) - throws IOException { - return new SystemPolicyV1Beta1Settings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return SystemPolicyV1Beta1StubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return SystemPolicyV1Beta1StubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return SystemPolicyV1Beta1StubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 SystemPolicyV1Beta1Settings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for SystemPolicyV1Beta1Settings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(SystemPolicyV1Beta1StubSettings.newBuilder(clientContext)); - } - - protected Builder(SystemPolicyV1Beta1Settings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(SystemPolicyV1Beta1StubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(SystemPolicyV1Beta1StubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder()); - } - - public SystemPolicyV1Beta1StubSettings.Builder getStubSettingsBuilder() { - return ((SystemPolicyV1Beta1StubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings.Builder getSystemPolicySettings() { - return getStubSettingsBuilder().getSystemPolicySettings(); - } - - @Override - public SystemPolicyV1Beta1Settings build() throws IOException { - return new SystemPolicyV1Beta1Settings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json deleted file mode 100644 index ec84086e..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.binaryauthorization.v1beta1", - "libraryPackage": "com.google.cloud.binaryauthorization.v1beta1", - "services": { - "BinauthzManagementServiceV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "BinauthzManagementServiceV1Beta1Client", - "rpcs": { - "CreateAttestor": { - "methods": ["createAttestor", "createAttestor", "createAttestor", "createAttestorCallable"] - }, - "DeleteAttestor": { - "methods": ["deleteAttestor", "deleteAttestor", "deleteAttestor", "deleteAttestorCallable"] - }, - "GetAttestor": { - "methods": ["getAttestor", "getAttestor", "getAttestor", "getAttestorCallable"] - }, - "GetPolicy": { - "methods": ["getPolicy", "getPolicy", "getPolicy", "getPolicyCallable"] - }, - "ListAttestors": { - "methods": ["listAttestors", "listAttestors", "listAttestors", "listAttestorsPagedCallable", "listAttestorsCallable"] - }, - "UpdateAttestor": { - "methods": ["updateAttestor", "updateAttestor", "updateAttestorCallable"] - }, - "UpdatePolicy": { - "methods": ["updatePolicy", "updatePolicy", "updatePolicyCallable"] - } - } - } - } - }, - "SystemPolicyV1Beta1": { - "clients": { - "grpc": { - "libraryClient": "SystemPolicyV1Beta1Client", - "rpcs": { - "GetSystemPolicy": { - "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java deleted file mode 100644 index 606b96af..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/package-info.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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. - * - *

======================= BinauthzManagementServiceV1Beta1Client ======================= - * - *

Service Description: Google Cloud Management Service for Binary Authorization admission - * policies and attestation authorities. - * - *

This API implements a REST model with the following objects: - * - *

    - *
  • [Policy][google.cloud.binaryauthorization.v1beta1.Policy] - *
  • [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] - *
- * - *

Sample for BinauthzManagementServiceV1Beta1Client: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client =
- *     BinauthzManagementServiceV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
- *   Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name);
- * }
- * }
- * - *

======================= SystemPolicyV1Beta1Client ======================= - * - *

Service Description: API for working with the system policy. - * - *

Sample for SystemPolicyV1Beta1Client: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) {
- *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
- *   Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.cloud.binaryauthorization.v1beta1; - -import javax.annotation.Generated; diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java deleted file mode 100644 index e1107739..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1Stub.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; -import com.google.protobuf.Empty; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the BinauthzManagementServiceV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class BinauthzManagementServiceV1Beta1Stub implements BackgroundResource { - - public UnaryCallable getPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getPolicyCallable()"); - } - - public UnaryCallable updatePolicyCallable() { - throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()"); - } - - public UnaryCallable createAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: createAttestorCallable()"); - } - - public UnaryCallable getAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: getAttestorCallable()"); - } - - public UnaryCallable updateAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: updateAttestorCallable()"); - } - - public UnaryCallable - listAttestorsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listAttestorsPagedCallable()"); - } - - public UnaryCallable listAttestorsCallable() { - throw new UnsupportedOperationException("Not implemented: listAttestorsCallable()"); - } - - public UnaryCallable deleteAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: deleteAttestorCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java deleted file mode 100644 index fce0b673..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/BinauthzManagementServiceV1Beta1StubSettings.java +++ /dev/null @@ -1,558 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -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.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -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.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; -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 BinauthzManagementServiceV1Beta1Stub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Beta1StubSettings.Builder
- *     binauthzManagementServiceV1Beta1SettingsBuilder =
- *         BinauthzManagementServiceV1Beta1StubSettings.newBuilder();
- * binauthzManagementServiceV1Beta1SettingsBuilder
- *     .getPolicySettings()
- *     .setRetrySettings(
- *         binauthzManagementServiceV1Beta1SettingsBuilder
- *             .getPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BinauthzManagementServiceV1Beta1StubSettings binauthzManagementServiceV1Beta1Settings =
- *     binauthzManagementServiceV1Beta1SettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1Beta1StubSettings - 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 getPolicySettings; - private final UnaryCallSettings updatePolicySettings; - private final UnaryCallSettings createAttestorSettings; - private final UnaryCallSettings getAttestorSettings; - private final UnaryCallSettings updateAttestorSettings; - private final PagedCallSettings< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings; - private final UnaryCallSettings deleteAttestorSettings; - - private static final PagedListDescriptor - LIST_ATTESTORS_PAGE_STR_DESC = - new PagedListDescriptor() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListAttestorsRequest injectToken(ListAttestorsRequest payload, String token) { - return ListAttestorsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListAttestorsRequest injectPageSize(ListAttestorsRequest payload, int pageSize) { - return ListAttestorsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(ListAttestorsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListAttestorsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListAttestorsResponse payload) { - return payload.getAttestorsList() == null - ? ImmutableList.of() - : payload.getAttestorsList(); - } - }; - - private static final PagedListResponseFactory< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse> - LIST_ATTESTORS_PAGE_STR_FACT = - new PagedListResponseFactory< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - ListAttestorsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext pageContext = - PageContext.create(callable, LIST_ATTESTORS_PAGE_STR_DESC, request, context); - return ListAttestorsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to getPolicy. */ - public UnaryCallSettings getPolicySettings() { - return getPolicySettings; - } - - /** Returns the object with the settings used for calls to updatePolicy. */ - public UnaryCallSettings updatePolicySettings() { - return updatePolicySettings; - } - - /** Returns the object with the settings used for calls to createAttestor. */ - public UnaryCallSettings createAttestorSettings() { - return createAttestorSettings; - } - - /** Returns the object with the settings used for calls to getAttestor. */ - public UnaryCallSettings getAttestorSettings() { - return getAttestorSettings; - } - - /** Returns the object with the settings used for calls to updateAttestor. */ - public UnaryCallSettings updateAttestorSettings() { - return updateAttestorSettings; - } - - /** Returns the object with the settings used for calls to listAttestors. */ - public PagedCallSettings - listAttestorsSettings() { - return listAttestorsSettings; - } - - /** Returns the object with the settings used for calls to deleteAttestor. */ - public UnaryCallSettings deleteAttestorSettings() { - return deleteAttestorSettings; - } - - public BinauthzManagementServiceV1Beta1Stub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcBinauthzManagementServiceV1Beta1Stub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonBinauthzManagementServiceV1Beta1Stub.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 "binaryauthorization.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "binaryauthorization.mtls.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) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", - GaxProperties.getLibraryVersion(BinauthzManagementServiceV1Beta1StubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", - GaxProperties.getLibraryVersion(BinauthzManagementServiceV1Beta1StubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return BinauthzManagementServiceV1Beta1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 BinauthzManagementServiceV1Beta1StubSettings(Builder settingsBuilder) - throws IOException { - super(settingsBuilder); - - getPolicySettings = settingsBuilder.getPolicySettings().build(); - updatePolicySettings = settingsBuilder.updatePolicySettings().build(); - createAttestorSettings = settingsBuilder.createAttestorSettings().build(); - getAttestorSettings = settingsBuilder.getAttestorSettings().build(); - updateAttestorSettings = settingsBuilder.updateAttestorSettings().build(); - listAttestorsSettings = settingsBuilder.listAttestorsSettings().build(); - deleteAttestorSettings = settingsBuilder.deleteAttestorSettings().build(); - } - - /** Builder for BinauthzManagementServiceV1Beta1StubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder getPolicySettings; - private final UnaryCallSettings.Builder updatePolicySettings; - private final UnaryCallSettings.Builder createAttestorSettings; - private final UnaryCallSettings.Builder getAttestorSettings; - private final UnaryCallSettings.Builder updateAttestorSettings; - private final PagedCallSettings.Builder< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings; - private final UnaryCallSettings.Builder deleteAttestorSettings; - 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.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAttestorsSettings = PagedCallSettings.newBuilder(LIST_ATTESTORS_PAGE_STR_FACT); - deleteAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getPolicySettings, - updatePolicySettings, - createAttestorSettings, - getAttestorSettings, - updateAttestorSettings, - listAttestorsSettings, - deleteAttestorSettings); - initDefaults(this); - } - - protected Builder(BinauthzManagementServiceV1Beta1StubSettings settings) { - super(settings); - - getPolicySettings = settings.getPolicySettings.toBuilder(); - updatePolicySettings = settings.updatePolicySettings.toBuilder(); - createAttestorSettings = settings.createAttestorSettings.toBuilder(); - getAttestorSettings = settings.getAttestorSettings.toBuilder(); - updateAttestorSettings = settings.updateAttestorSettings.toBuilder(); - listAttestorsSettings = settings.listAttestorsSettings.toBuilder(); - deleteAttestorSettings = settings.deleteAttestorSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getPolicySettings, - updatePolicySettings, - createAttestorSettings, - getAttestorSettings, - updateAttestorSettings, - listAttestorsSettings, - deleteAttestorSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updatePolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listAttestorsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getPolicy. */ - public UnaryCallSettings.Builder getPolicySettings() { - return getPolicySettings; - } - - /** Returns the builder for the settings used for calls to updatePolicy. */ - public UnaryCallSettings.Builder updatePolicySettings() { - return updatePolicySettings; - } - - /** Returns the builder for the settings used for calls to createAttestor. */ - public UnaryCallSettings.Builder createAttestorSettings() { - return createAttestorSettings; - } - - /** Returns the builder for the settings used for calls to getAttestor. */ - public UnaryCallSettings.Builder getAttestorSettings() { - return getAttestorSettings; - } - - /** Returns the builder for the settings used for calls to updateAttestor. */ - public UnaryCallSettings.Builder updateAttestorSettings() { - return updateAttestorSettings; - } - - /** Returns the builder for the settings used for calls to listAttestors. */ - public PagedCallSettings.Builder< - ListAttestorsRequest, ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return listAttestorsSettings; - } - - /** Returns the builder for the settings used for calls to deleteAttestor. */ - public UnaryCallSettings.Builder deleteAttestorSettings() { - return deleteAttestorSettings; - } - - @Override - public BinauthzManagementServiceV1Beta1StubSettings build() throws IOException { - return new BinauthzManagementServiceV1Beta1StubSettings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java deleted file mode 100644 index 9cfa95a1..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1CallableFactory.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the BinauthzManagementServiceV1Beta1 service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcBinauthzManagementServiceV1Beta1CallableFactory - 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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java deleted file mode 100644 index afb534a6..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcBinauthzManagementServiceV1Beta1Stub.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -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.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; -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.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the BinauthzManagementServiceV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcBinauthzManagementServiceV1Beta1Stub extends BinauthzManagementServiceV1Beta1Stub { - private static final MethodDescriptor getPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetPolicy") - .setRequestMarshaller(ProtoUtils.marshaller(GetPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor updatePolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdatePolicy") - .setRequestMarshaller(ProtoUtils.marshaller(UpdatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/CreateAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(CreateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor getAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetAttestor") - .setRequestMarshaller(ProtoUtils.marshaller(GetAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdateAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(UpdateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listAttestorsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/ListAttestors") - .setRequestMarshaller( - ProtoUtils.marshaller(ListAttestorsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListAttestorsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/DeleteAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(DeleteAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable getPolicyCallable; - private final UnaryCallable updatePolicyCallable; - private final UnaryCallable createAttestorCallable; - private final UnaryCallable getAttestorCallable; - private final UnaryCallable updateAttestorCallable; - private final UnaryCallable listAttestorsCallable; - private final UnaryCallable - listAttestorsPagedCallable; - private final UnaryCallable deleteAttestorCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcBinauthzManagementServiceV1Beta1Stub create( - BinauthzManagementServiceV1Beta1StubSettings settings) throws IOException { - return new GrpcBinauthzManagementServiceV1Beta1Stub(settings, ClientContext.create(settings)); - } - - public static final GrpcBinauthzManagementServiceV1Beta1Stub create(ClientContext clientContext) - throws IOException { - return new GrpcBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcBinauthzManagementServiceV1Beta1Stub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcBinauthzManagementServiceV1Beta1Stub, 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 GrpcBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcBinauthzManagementServiceV1Beta1CallableFactory()); - } - - /** - * Constructs an instance of GrpcBinauthzManagementServiceV1Beta1Stub, 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 GrpcBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings getPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updatePolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updatePolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("policy.name", String.valueOf(request.getPolicy().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings createAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updateAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("attestor.name", String.valueOf(request.getAttestor().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings listAttestorsTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(listAttestorsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getPolicyCallable = - callableFactory.createUnaryCallable( - getPolicyTransportSettings, settings.getPolicySettings(), clientContext); - this.updatePolicyCallable = - callableFactory.createUnaryCallable( - updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); - this.createAttestorCallable = - callableFactory.createUnaryCallable( - createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); - this.getAttestorCallable = - callableFactory.createUnaryCallable( - getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); - this.updateAttestorCallable = - callableFactory.createUnaryCallable( - updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); - this.listAttestorsCallable = - callableFactory.createUnaryCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.listAttestorsPagedCallable = - callableFactory.createPagedCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.deleteAttestorCallable = - callableFactory.createUnaryCallable( - deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getPolicyCallable() { - return getPolicyCallable; - } - - @Override - public UnaryCallable updatePolicyCallable() { - return updatePolicyCallable; - } - - @Override - public UnaryCallable createAttestorCallable() { - return createAttestorCallable; - } - - @Override - public UnaryCallable getAttestorCallable() { - return getAttestorCallable; - } - - @Override - public UnaryCallable updateAttestorCallable() { - return updateAttestorCallable; - } - - @Override - public UnaryCallable listAttestorsCallable() { - return listAttestorsCallable; - } - - @Override - public UnaryCallable - listAttestorsPagedCallable() { - return listAttestorsPagedCallable; - } - - @Override - public UnaryCallable deleteAttestorCallable() { - return deleteAttestorCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java deleted file mode 100644 index a46689b3..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1CallableFactory.java +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the SystemPolicyV1Beta1 service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcSystemPolicyV1Beta1CallableFactory 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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java deleted file mode 100644 index 94967d77..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/GrpcSystemPolicyV1Beta1Stub.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the SystemPolicyV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class GrpcSystemPolicyV1Beta1Stub extends SystemPolicyV1Beta1Stub { - private static final MethodDescriptor - getSystemPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(GetSystemPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) - .build(); - - private final UnaryCallable getSystemPolicyCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcSystemPolicyV1Beta1Stub create(SystemPolicyV1Beta1StubSettings settings) - throws IOException { - return new GrpcSystemPolicyV1Beta1Stub(settings, ClientContext.create(settings)); - } - - public static final GrpcSystemPolicyV1Beta1Stub create(ClientContext clientContext) - throws IOException { - return new GrpcSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcSystemPolicyV1Beta1Stub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcSystemPolicyV1Beta1CallableFactory()); - } - - /** - * Constructs an instance of GrpcSystemPolicyV1Beta1Stub, 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 GrpcSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings getSystemPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getSystemPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getSystemPolicyCallable = - callableFactory.createUnaryCallable( - getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getSystemPolicyCallable() { - return getSystemPolicyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java deleted file mode 100644 index 3fdaa60f..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1CallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the BinauthzManagementServiceV1Beta1 service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonBinauthzManagementServiceV1Beta1CallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java deleted file mode 100644 index 91810f99..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonBinauthzManagementServiceV1Beta1Stub.java +++ /dev/null @@ -1,527 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the BinauthzManagementServiceV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonBinauthzManagementServiceV1Beta1Stub - extends BinauthzManagementServiceV1Beta1Stub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor getPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updatePolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdatePolicy") - .setHttpMethod("PUT") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{policy.name=projects/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "policy.name", request.getPolicy().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("policy", request.getPolicy(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/CreateAttestor") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{parent=projects/*}/attestors", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "attestorId", request.getAttestorId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("attestor", request.getAttestor(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/GetAttestor") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/UpdateAttestor") - .setHttpMethod("PUT") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{attestor.name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "attestor.name", request.getAttestor().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("attestor", request.getAttestor(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - listAttestorsMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/ListAttestors") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{parent=projects/*}/attestors", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListAttestorsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1/DeleteAttestor") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable getPolicyCallable; - private final UnaryCallable updatePolicyCallable; - private final UnaryCallable createAttestorCallable; - private final UnaryCallable getAttestorCallable; - private final UnaryCallable updateAttestorCallable; - private final UnaryCallable listAttestorsCallable; - private final UnaryCallable - listAttestorsPagedCallable; - private final UnaryCallable deleteAttestorCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( - BinauthzManagementServiceV1Beta1StubSettings settings) throws IOException { - return new HttpJsonBinauthzManagementServiceV1Beta1Stub( - settings, ClientContext.create(settings)); - } - - public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( - ClientContext clientContext) throws IOException { - return new HttpJsonBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonBinauthzManagementServiceV1Beta1Stub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonBinauthzManagementServiceV1Beta1Stub, 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 HttpJsonBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonBinauthzManagementServiceV1Beta1CallableFactory()); - } - - /** - * Constructs an instance of HttpJsonBinauthzManagementServiceV1Beta1Stub, 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 HttpJsonBinauthzManagementServiceV1Beta1Stub( - BinauthzManagementServiceV1Beta1StubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings getPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updatePolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updatePolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings createAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings getAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings updateAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listAttestorsTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(listAttestorsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.getPolicyCallable = - callableFactory.createUnaryCallable( - getPolicyTransportSettings, settings.getPolicySettings(), clientContext); - this.updatePolicyCallable = - callableFactory.createUnaryCallable( - updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); - this.createAttestorCallable = - callableFactory.createUnaryCallable( - createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); - this.getAttestorCallable = - callableFactory.createUnaryCallable( - getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); - this.updateAttestorCallable = - callableFactory.createUnaryCallable( - updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); - this.listAttestorsCallable = - callableFactory.createUnaryCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.listAttestorsPagedCallable = - callableFactory.createPagedCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.deleteAttestorCallable = - callableFactory.createUnaryCallable( - deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(getPolicyMethodDescriptor); - methodDescriptors.add(updatePolicyMethodDescriptor); - methodDescriptors.add(createAttestorMethodDescriptor); - methodDescriptors.add(getAttestorMethodDescriptor); - methodDescriptors.add(updateAttestorMethodDescriptor); - methodDescriptors.add(listAttestorsMethodDescriptor); - methodDescriptors.add(deleteAttestorMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable getPolicyCallable() { - return getPolicyCallable; - } - - @Override - public UnaryCallable updatePolicyCallable() { - return updatePolicyCallable; - } - - @Override - public UnaryCallable createAttestorCallable() { - return createAttestorCallable; - } - - @Override - public UnaryCallable getAttestorCallable() { - return getAttestorCallable; - } - - @Override - public UnaryCallable updateAttestorCallable() { - return updateAttestorCallable; - } - - @Override - public UnaryCallable listAttestorsCallable() { - return listAttestorsCallable; - } - - @Override - public UnaryCallable - listAttestorsPagedCallable() { - return listAttestorsPagedCallable; - } - - @Override - public UnaryCallable deleteAttestorCallable() { - return deleteAttestorCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java deleted file mode 100644 index 8f2ee604..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1CallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the SystemPolicyV1Beta1 service API. - * - *

This class is for advanced usage. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonSystemPolicyV1Beta1CallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java deleted file mode 100644 index 9dee319f..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/HttpJsonSystemPolicyV1Beta1Stub.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.protobuf.TypeRegistry; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the SystemPolicyV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public class HttpJsonSystemPolicyV1Beta1Stub extends SystemPolicyV1Beta1Stub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - getSystemPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1/GetSystemPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1beta1/{name=locations/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable getSystemPolicyCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonSystemPolicyV1Beta1Stub create( - SystemPolicyV1Beta1StubSettings settings) throws IOException { - return new HttpJsonSystemPolicyV1Beta1Stub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonSystemPolicyV1Beta1Stub create(ClientContext clientContext) - throws IOException { - return new HttpJsonSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonSystemPolicyV1Beta1Stub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonSystemPolicyV1Beta1Stub, 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 HttpJsonSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonSystemPolicyV1Beta1CallableFactory()); - } - - /** - * Constructs an instance of HttpJsonSystemPolicyV1Beta1Stub, 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 HttpJsonSystemPolicyV1Beta1Stub( - SystemPolicyV1Beta1StubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings getSystemPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getSystemPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.getSystemPolicyCallable = - callableFactory.createUnaryCallable( - getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(getSystemPolicyMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable getSystemPolicyCallable() { - return getSystemPolicyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java deleted file mode 100644 index 43efc4be..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1Stub.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the SystemPolicyV1Beta1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@BetaApi -@Generated("by gapic-generator-java") -public abstract class SystemPolicyV1Beta1Stub implements BackgroundResource { - - public UnaryCallable getSystemPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getSystemPolicyCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java deleted file mode 100644 index 06258538..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/cloud/binaryauthorization/v1beta1/stub/SystemPolicyV1Beta1StubSettings.java +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -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 java.io.IOException; -import java.util.List; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Settings class to configure an instance of {@link SystemPolicyV1Beta1Stub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder =
- *     SystemPolicyV1Beta1StubSettings.newBuilder();
- * systemPolicyV1Beta1SettingsBuilder
- *     .getSystemPolicySettings()
- *     .setRetrySettings(
- *         systemPolicyV1Beta1SettingsBuilder
- *             .getSystemPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SystemPolicyV1Beta1StubSettings systemPolicyV1Beta1Settings =
- *     systemPolicyV1Beta1SettingsBuilder.build();
- * }
- */ -@BetaApi -@Generated("by gapic-generator-java") -public class SystemPolicyV1Beta1StubSettings 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 getSystemPolicySettings; - - /** Returns the object with the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings getSystemPolicySettings() { - return getSystemPolicySettings; - } - - public SystemPolicyV1Beta1Stub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcSystemPolicyV1Beta1Stub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonSystemPolicyV1Beta1Stub.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 "binaryauthorization.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "binaryauthorization.mtls.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) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1Beta1StubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1Beta1StubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SystemPolicyV1Beta1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 SystemPolicyV1Beta1StubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getSystemPolicySettings = settingsBuilder.getSystemPolicySettings().build(); - } - - /** Builder for SystemPolicyV1Beta1StubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder getSystemPolicySettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getSystemPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(getSystemPolicySettings); - initDefaults(this); - } - - protected Builder(SystemPolicyV1Beta1StubSettings settings) { - super(settings); - - getSystemPolicySettings = settings.getSystemPolicySettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(getSystemPolicySettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getSystemPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings.Builder getSystemPolicySettings() { - return getSystemPolicySettings; - } - - @Override - public SystemPolicyV1Beta1StubSettings build() throws IOException { - return new SystemPolicyV1Beta1StubSettings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java deleted file mode 100644 index 34a46d9c..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Client.java +++ /dev/null @@ -1,1223 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.ApiFuture; -import com.google.api.core.ApiFutures; -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.common.util.concurrent.MoreExecutors; -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1Stub; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; -import java.io.IOException; -import java.util.List; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: Google Cloud Management Service for Binary Authorization admission policies - * and attestation authorities. - * - *

This API implements a REST model with the following objects: - * - *

    - *
  • [Policy][google.cloud.binaryauthorization.v1.Policy] - *
  • [Attestor][google.cloud.binaryauthorization.v1.Attestor] - *
- * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
- *     BinauthzManagementServiceV1Client.create()) {
- *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
- *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
- *     BinauthzManagementServiceV1Settings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
- *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
- *     BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build();
- * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
- *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
- *     BinauthzManagementServiceV1Settings.newHttpJsonBuilder().build();
- * BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
- *     BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1Client implements BackgroundResource { - private final BinauthzManagementServiceV1Settings settings; - private final BinauthzManagementServiceV1Stub stub; - - /** Constructs an instance of BinauthzManagementServiceV1Client with default settings. */ - public static final BinauthzManagementServiceV1Client create() throws IOException { - return create(BinauthzManagementServiceV1Settings.newBuilder().build()); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client create( - BinauthzManagementServiceV1Settings settings) throws IOException { - return new BinauthzManagementServiceV1Client(settings); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Client, using the given stub for making - * calls. This is for advanced usage - prefer using create(BinauthzManagementServiceV1Settings). - */ - public static final BinauthzManagementServiceV1Client create( - BinauthzManagementServiceV1Stub stub) { - return new BinauthzManagementServiceV1Client(stub); - } - - /** - * Constructs an instance of BinauthzManagementServiceV1Client, 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 BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Settings settings) - throws IOException { - this.settings = settings; - this.stub = ((BinauthzManagementServiceV1StubSettings) settings.getStubSettings()).createStub(); - } - - protected BinauthzManagementServiceV1Client(BinauthzManagementServiceV1Stub stub) { - this.settings = null; - this.stub = stub; - } - - public final BinauthzManagementServiceV1Settings getSettings() { - return settings; - } - - public BinauthzManagementServiceV1Stub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a - * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
-   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the - * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format - * `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Policy getPolicy(PolicyName name) { - Service.GetPolicyRequest request = - Service.GetPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a - * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
-   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name of the - * [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, in the format - * `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Policy getPolicy(String name) { - Service.GetPolicyRequest request = Service.GetPolicyRequest.newBuilder().setName(name).build(); - return getPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a - * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.GetPolicyRequest request =
-   *       Service.GetPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
-   *           .build();
-   *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(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 Resources.Policy getPolicy(Service.GetPolicyRequest request) { - return getPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the - * [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to a container - * image, before the project is allowed to deploy that image. There is at most one policy per - * project. All image admission requests are permitted if a project has no policy. - * - *

Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a - * default [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.GetPolicyRequest request =
-   *       Service.GetPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofProjectName("[PROJECT]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.getPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getPolicyCallable() { - return stub.getPolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is - * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Resources.Policy policy = Resources.Policy.newBuilder().build();
-   *   Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(policy);
-   * }
-   * }
- * - * @param policy Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] - * value. The service will overwrite the [policy - * name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in the - * request URL, in the format `projects/*/policy`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Policy updatePolicy(Resources.Policy policy) { - Service.UpdatePolicyRequest request = - Service.UpdatePolicyRequest.newBuilder().setPolicy(policy).build(); - return updatePolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is - * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.UpdatePolicyRequest request =
-   *       Service.UpdatePolicyRequest.newBuilder()
-   *           .setPolicy(Resources.Policy.newBuilder().build())
-   *           .build();
-   *   Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(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 Resources.Policy updatePolicy(Service.UpdatePolicyRequest request) { - return updatePolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and - * returns a copy of the new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is - * always updated as a whole, to avoid race conditions with concurrent policy enforcement (or - * management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the - * request is malformed. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.UpdatePolicyRequest request =
-   *       Service.UpdatePolicyRequest.newBuilder()
-   *           .setPolicy(Resources.Policy.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.updatePolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable updatePolicyCallable() { - return stub.updatePolicyCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the - * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project - * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   String attestorId = "attestorId2055733027";
-   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
-   *   Resources.Attestor response =
-   *       binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
-   * }
-   * }
- * - * @param parent Required. The parent of this - * [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] - * value. The service will overwrite the [attestor - * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in - * the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Attestor createAttestor( - ProjectName parent, String attestorId, Resources.Attestor attestor) { - Service.CreateAttestorRequest request = - Service.CreateAttestorRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .setAttestorId(attestorId) - .setAttestor(attestor) - .build(); - return createAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the - * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project - * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   String attestorId = "attestorId2055733027";
-   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
-   *   Resources.Attestor response =
-   *       binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor);
-   * }
-   * }
- * - * @param parent Required. The parent of this - * [attestor][google.cloud.binaryauthorization.v1.Attestor]. - * @param attestorId Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - * @param attestor Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] - * value. The service will overwrite the [attestor - * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, in - * the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Attestor createAttestor( - String parent, String attestorId, Resources.Attestor attestor) { - Service.CreateAttestorRequest request = - Service.CreateAttestorRequest.newBuilder() - .setParent(parent) - .setAttestorId(attestorId) - .setAttestor(attestor) - .build(); - return createAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the - * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project - * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.CreateAttestorRequest request =
-   *       Service.CreateAttestorRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setAttestorId("attestorId2055733027")
-   *           .setAttestor(Resources.Attestor.newBuilder().build())
-   *           .build();
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.createAttestor(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 Resources.Attestor createAttestor(Service.CreateAttestorRequest request) { - return createAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the - * new [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project - * does not exist, INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.CreateAttestorRequest request =
-   *       Service.CreateAttestorRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setAttestorId("attestorId2055733027")
-   *           .setAttestor(Resources.Attestor.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.createAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - createAttestorCallable() { - return stub.createAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] - * to retrieve, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Attestor getAttestor(AttestorName name) { - Service.GetAttestorRequest request = - Service.GetAttestorRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] - * to retrieve, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Attestor getAttestor(String name) { - Service.GetAttestorRequest request = - Service.GetAttestorRequest.newBuilder().setName(name).build(); - return getAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.GetAttestorRequest request =
-   *       Service.GetAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(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 Resources.Attestor getAttestor(Service.GetAttestorRequest request) { - return getAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.GetAttestorRequest request =
-   *       Service.GetAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.getAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable getAttestorCallable() { - return stub.getAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Resources.Attestor attestor = Resources.Attestor.newBuilder().build();
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(attestor);
-   * }
-   * }
- * - * @param attestor Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] - * value. The service will overwrite the [attestor - * name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name in - * the request URL, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Attestor updateAttestor(Resources.Attestor attestor) { - Service.UpdateAttestorRequest request = - Service.UpdateAttestorRequest.newBuilder().setAttestor(attestor).build(); - return updateAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.UpdateAttestorRequest request =
-   *       Service.UpdateAttestorRequest.newBuilder()
-   *           .setAttestor(Resources.Attestor.newBuilder().build())
-   *           .build();
-   *   Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(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 Resources.Attestor updateAttestor(Service.UpdateAttestorRequest request) { - return updateAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.UpdateAttestorRequest request =
-   *       Service.UpdateAttestorRequest.newBuilder()
-   *           .setAttestor(Resources.Attestor.newBuilder().build())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.updateAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Attestor response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - updateAttestorCallable() { - return stub.updateAttestorCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if - * the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   ProjectName parent = ProjectName.of("[PROJECT]");
-   *   for (Resources.Attestor element :
-   *       binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAttestorsPagedResponse listAttestors(ProjectName parent) { - Service.ListAttestorsRequest request = - Service.ListAttestorsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listAttestors(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if - * the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   String parent = ProjectName.of("[PROJECT]").toString();
-   *   for (Resources.Attestor element :
-   *       binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param parent Required. The resource name of the project associated with the - * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListAttestorsPagedResponse listAttestors(String parent) { - Service.ListAttestorsRequest request = - Service.ListAttestorsRequest.newBuilder().setParent(parent).build(); - return listAttestors(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if - * the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.ListAttestorsRequest request =
-   *       Service.ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   for (Resources.Attestor element :
-   *       binauthzManagementServiceV1Client.listAttestors(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 ListAttestorsPagedResponse listAttestors(Service.ListAttestorsRequest request) { - return listAttestorsPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if - * the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.ListAttestorsRequest request =
-   *       Service.ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.listAttestorsPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Resources.Attestor element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listAttestorsPagedCallable() { - return stub.listAttestorsPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. Returns INVALID_ARGUMENT if - * the project does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.ListAttestorsRequest request =
-   *       Service.ListAttestorsRequest.newBuilder()
-   *           .setParent(ProjectName.of("[PROJECT]").toString())
-   *           .setPageSize(883849137)
-   *           .setPageToken("pageToken873572522")
-   *           .build();
-   *   while (true) {
-   *     Service.ListAttestorsResponse response =
-   *         binauthzManagementServiceV1Client.listAttestorsCallable().call(request);
-   *     for (Resources.Attestor element : response.getAttestorsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listAttestorsCallable() { - return stub.listAttestorsCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]");
-   *   binauthzManagementServiceV1Client.deleteAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] - * to delete, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAttestor(AttestorName name) { - Service.DeleteAttestorRequest request = - Service.DeleteAttestorRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - deleteAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString();
-   *   binauthzManagementServiceV1Client.deleteAttestor(name);
-   * }
-   * }
- * - * @param name Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] - * to delete, in the format `projects/*/attestors/*`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final void deleteAttestor(String name) { - Service.DeleteAttestorRequest request = - Service.DeleteAttestorRequest.newBuilder().setName(name).build(); - deleteAttestor(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.DeleteAttestorRequest request =
-   *       Service.DeleteAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   binauthzManagementServiceV1Client.deleteAttestor(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 deleteAttestor(Service.DeleteAttestorRequest request) { - deleteAttestorCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
-   *     BinauthzManagementServiceV1Client.create()) {
-   *   Service.DeleteAttestorRequest request =
-   *       Service.DeleteAttestorRequest.newBuilder()
-   *           .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       binauthzManagementServiceV1Client.deleteAttestorCallable().futureCall(request);
-   *   // Do something.
-   *   future.get();
-   * }
-   * }
- */ - public final UnaryCallable deleteAttestorCallable() { - return stub.deleteAttestorCallable(); - } - - @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 ListAttestorsPagedResponse - extends AbstractPagedListResponse< - Service.ListAttestorsRequest, - Service.ListAttestorsResponse, - Resources.Attestor, - ListAttestorsPage, - ListAttestorsFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext - context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListAttestorsPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListAttestorsPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListAttestorsPagedResponse(ListAttestorsPage page) { - super(page, ListAttestorsFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListAttestorsPage - extends AbstractPage< - Service.ListAttestorsRequest, - Service.ListAttestorsResponse, - Resources.Attestor, - ListAttestorsPage> { - - private ListAttestorsPage( - PageContext - context, - Service.ListAttestorsResponse response) { - super(context, response); - } - - private static ListAttestorsPage createEmptyPage() { - return new ListAttestorsPage(null, null); - } - - @Override - protected ListAttestorsPage createPage( - PageContext - context, - Service.ListAttestorsResponse response) { - return new ListAttestorsPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext - context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListAttestorsFixedSizeCollection - extends AbstractFixedSizeCollection< - Service.ListAttestorsRequest, - Service.ListAttestorsResponse, - Resources.Attestor, - ListAttestorsPage, - ListAttestorsFixedSizeCollection> { - - private ListAttestorsFixedSizeCollection(List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListAttestorsFixedSizeCollection createEmptyCollection() { - return new ListAttestorsFixedSizeCollection(null, 0); - } - - @Override - protected ListAttestorsFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListAttestorsFixedSizeCollection(pages, collectionSize); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java deleted file mode 100644 index 8ac6eba0..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Settings.java +++ /dev/null @@ -1,285 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -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.httpjson.InstantiatingHttpJsonChannelProvider; -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.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; -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 BinauthzManagementServiceV1Client}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder =
- *     BinauthzManagementServiceV1Settings.newBuilder();
- * binauthzManagementServiceV1SettingsBuilder
- *     .getPolicySettings()
- *     .setRetrySettings(
- *         binauthzManagementServiceV1SettingsBuilder
- *             .getPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings =
- *     binauthzManagementServiceV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1Settings - extends ClientSettings { - - /** Returns the object with the settings used for calls to getPolicy. */ - public UnaryCallSettings getPolicySettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getPolicySettings(); - } - - /** Returns the object with the settings used for calls to updatePolicy. */ - public UnaryCallSettings updatePolicySettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updatePolicySettings(); - } - - /** Returns the object with the settings used for calls to createAttestor. */ - public UnaryCallSettings - createAttestorSettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).createAttestorSettings(); - } - - /** Returns the object with the settings used for calls to getAttestor. */ - public UnaryCallSettings getAttestorSettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).getAttestorSettings(); - } - - /** Returns the object with the settings used for calls to updateAttestor. */ - public UnaryCallSettings - updateAttestorSettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).updateAttestorSettings(); - } - - /** Returns the object with the settings used for calls to listAttestors. */ - public PagedCallSettings< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).listAttestorsSettings(); - } - - /** Returns the object with the settings used for calls to deleteAttestor. */ - public UnaryCallSettings deleteAttestorSettings() { - return ((BinauthzManagementServiceV1StubSettings) getStubSettings()).deleteAttestorSettings(); - } - - public static final BinauthzManagementServiceV1Settings create( - BinauthzManagementServiceV1StubSettings stub) throws IOException { - return new BinauthzManagementServiceV1Settings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return BinauthzManagementServiceV1StubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return BinauthzManagementServiceV1StubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return BinauthzManagementServiceV1StubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 BinauthzManagementServiceV1Settings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for BinauthzManagementServiceV1Settings. */ - public static class Builder - extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(BinauthzManagementServiceV1StubSettings.newBuilder(clientContext)); - } - - protected Builder(BinauthzManagementServiceV1Settings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(BinauthzManagementServiceV1StubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(BinauthzManagementServiceV1StubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder()); - } - - public BinauthzManagementServiceV1StubSettings.Builder getStubSettingsBuilder() { - return ((BinauthzManagementServiceV1StubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getPolicy. */ - public UnaryCallSettings.Builder - getPolicySettings() { - return getStubSettingsBuilder().getPolicySettings(); - } - - /** Returns the builder for the settings used for calls to updatePolicy. */ - public UnaryCallSettings.Builder - updatePolicySettings() { - return getStubSettingsBuilder().updatePolicySettings(); - } - - /** Returns the builder for the settings used for calls to createAttestor. */ - public UnaryCallSettings.Builder - createAttestorSettings() { - return getStubSettingsBuilder().createAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to getAttestor. */ - public UnaryCallSettings.Builder - getAttestorSettings() { - return getStubSettingsBuilder().getAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to updateAttestor. */ - public UnaryCallSettings.Builder - updateAttestorSettings() { - return getStubSettingsBuilder().updateAttestorSettings(); - } - - /** Returns the builder for the settings used for calls to listAttestors. */ - public PagedCallSettings.Builder< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return getStubSettingsBuilder().listAttestorsSettings(); - } - - /** Returns the builder for the settings used for calls to deleteAttestor. */ - public UnaryCallSettings.Builder - deleteAttestorSettings() { - return getStubSettingsBuilder().deleteAttestorSettings(); - } - - @Override - public BinauthzManagementServiceV1Settings build() throws IOException { - return new BinauthzManagementServiceV1Settings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java deleted file mode 100644 index a5f90d41..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Client.java +++ /dev/null @@ -1,310 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1Stub; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: API for working with the system policy. - * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
- *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
- *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Settings systemPolicyV1Settings =
- *     SystemPolicyV1Settings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Settings systemPolicyV1Settings =
- *     SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build();
- * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Settings systemPolicyV1Settings =
- *     SystemPolicyV1Settings.newHttpJsonBuilder().build();
- * SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class SystemPolicyV1Client implements BackgroundResource { - private final SystemPolicyV1Settings settings; - private final SystemPolicyV1Stub stub; - - /** Constructs an instance of SystemPolicyV1Client with default settings. */ - public static final SystemPolicyV1Client create() throws IOException { - return create(SystemPolicyV1Settings.newBuilder().build()); - } - - /** - * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client create(SystemPolicyV1Settings settings) - throws IOException { - return new SystemPolicyV1Client(settings); - } - - /** - * Constructs an instance of SystemPolicyV1Client, using the given stub for making calls. This is - * for advanced usage - prefer using create(SystemPolicyV1Settings). - */ - public static final SystemPolicyV1Client create(SystemPolicyV1Stub stub) { - return new SystemPolicyV1Client(stub); - } - - /** - * Constructs an instance of SystemPolicyV1Client, 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 SystemPolicyV1Client(SystemPolicyV1Settings settings) throws IOException { - this.settings = settings; - this.stub = ((SystemPolicyV1StubSettings) settings.getStubSettings()).createStub(); - } - - protected SystemPolicyV1Client(SystemPolicyV1Stub stub) { - this.settings = null; - this.stub = stub; - } - - public final SystemPolicyV1Settings getSettings() { - return settings; - } - - public SystemPolicyV1Stub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
-   *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
-   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name, in the format `locations/*/policy`. Note that the - * system policy is not associated with a project. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Policy getSystemPolicy(PolicyName name) { - Service.GetSystemPolicyRequest request = - Service.GetSystemPolicyRequest.newBuilder() - .setName(name == null ? null : name.toString()) - .build(); - return getSystemPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
-   *   String name = PolicyName.ofProjectName("[PROJECT]").toString();
-   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
-   * }
-   * }
- * - * @param name Required. The resource name, in the format `locations/*/policy`. Note that the - * system policy is not associated with a project. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Resources.Policy getSystemPolicy(String name) { - Service.GetSystemPolicyRequest request = - Service.GetSystemPolicyRequest.newBuilder().setName(name).build(); - return getSystemPolicy(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
-   *   Service.GetSystemPolicyRequest request =
-   *       Service.GetSystemPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofLocationName("[LOCATION]").toString())
-   *           .build();
-   *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(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 Resources.Policy getSystemPolicy(Service.GetSystemPolicyRequest request) { - return getSystemPolicyCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Gets the current system policy in the specified location. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
-   *   Service.GetSystemPolicyRequest request =
-   *       Service.GetSystemPolicyRequest.newBuilder()
-   *           .setName(PolicyName.ofLocationName("[LOCATION]").toString())
-   *           .build();
-   *   ApiFuture future =
-   *       systemPolicyV1Client.getSystemPolicyCallable().futureCall(request);
-   *   // Do something.
-   *   Resources.Policy response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable - getSystemPolicyCallable() { - return stub.getSystemPolicyCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java deleted file mode 100644 index 54bbcc7e..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Settings.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; -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 SystemPolicyV1Client}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder =
- *     SystemPolicyV1Settings.newBuilder();
- * systemPolicyV1SettingsBuilder
- *     .getSystemPolicySettings()
- *     .setRetrySettings(
- *         systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class SystemPolicyV1Settings extends ClientSettings { - - /** Returns the object with the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings - getSystemPolicySettings() { - return ((SystemPolicyV1StubSettings) getStubSettings()).getSystemPolicySettings(); - } - - public static final SystemPolicyV1Settings create(SystemPolicyV1StubSettings stub) - throws IOException { - return new SystemPolicyV1Settings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return SystemPolicyV1StubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return SystemPolicyV1StubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return SystemPolicyV1StubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return SystemPolicyV1StubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return SystemPolicyV1StubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return SystemPolicyV1StubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return SystemPolicyV1StubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SystemPolicyV1StubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 SystemPolicyV1Settings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for SystemPolicyV1Settings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(SystemPolicyV1StubSettings.newBuilder(clientContext)); - } - - protected Builder(SystemPolicyV1Settings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(SystemPolicyV1StubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(SystemPolicyV1StubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(SystemPolicyV1StubSettings.newHttpJsonBuilder()); - } - - public SystemPolicyV1StubSettings.Builder getStubSettingsBuilder() { - return ((SystemPolicyV1StubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings.Builder - getSystemPolicySettings() { - return getStubSettingsBuilder().getSystemPolicySettings(); - } - - @Override - public SystemPolicyV1Settings build() throws IOException { - return new SystemPolicyV1Settings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java deleted file mode 100644 index dd48a8ae..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Client.java +++ /dev/null @@ -1,273 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1Stub; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Service Description: BinAuthz Attestor verification - * - *

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
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
- *   Service.ValidateAttestationOccurrenceRequest request =
- *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
- *           .setAttestor("attestor542920680")
- *           .setAttestation(AttestationOccurrence.newBuilder().build())
- *           .setOccurrenceNote("occurrenceNote1722072419")
- *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
- *           .build();
- *   Service.ValidateAttestationOccurrenceResponse response =
- *       validationHelperV1Client.validateAttestationOccurrence(request);
- * }
- * }
- * - *

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

To customize credentials: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ValidationHelperV1Settings validationHelperV1Settings =
- *     ValidationHelperV1Settings.newBuilder()
- *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
- *         .build();
- * ValidationHelperV1Client validationHelperV1Client =
- *     ValidationHelperV1Client.create(validationHelperV1Settings);
- * }
- * - *

To customize the endpoint: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ValidationHelperV1Settings validationHelperV1Settings =
- *     ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build();
- * ValidationHelperV1Client validationHelperV1Client =
- *     ValidationHelperV1Client.create(validationHelperV1Settings);
- * }
- * - *

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over - * the wire: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ValidationHelperV1Settings validationHelperV1Settings =
- *     ValidationHelperV1Settings.newHttpJsonBuilder().build();
- * ValidationHelperV1Client validationHelperV1Client =
- *     ValidationHelperV1Client.create(validationHelperV1Settings);
- * }
- * - *

Please refer to the GitHub repository's samples for more quickstart code snippets. - */ -@Generated("by gapic-generator-java") -public class ValidationHelperV1Client implements BackgroundResource { - private final ValidationHelperV1Settings settings; - private final ValidationHelperV1Stub stub; - - /** Constructs an instance of ValidationHelperV1Client with default settings. */ - public static final ValidationHelperV1Client create() throws IOException { - return create(ValidationHelperV1Settings.newBuilder().build()); - } - - /** - * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client create(ValidationHelperV1Settings settings) - throws IOException { - return new ValidationHelperV1Client(settings); - } - - /** - * Constructs an instance of ValidationHelperV1Client, using the given stub for making calls. This - * is for advanced usage - prefer using create(ValidationHelperV1Settings). - */ - public static final ValidationHelperV1Client create(ValidationHelperV1Stub stub) { - return new ValidationHelperV1Client(stub); - } - - /** - * Constructs an instance of ValidationHelperV1Client, 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 ValidationHelperV1Client(ValidationHelperV1Settings settings) throws IOException { - this.settings = settings; - this.stub = ((ValidationHelperV1StubSettings) settings.getStubSettings()).createStub(); - } - - protected ValidationHelperV1Client(ValidationHelperV1Stub stub) { - this.settings = null; - this.stub = stub; - } - - public final ValidationHelperV1Settings getSettings() { - return settings; - } - - public ValidationHelperV1Stub getStub() { - return stub; - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns whether the given Attestation for the given image URI was signed by the given Attestor - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
-   *   Service.ValidateAttestationOccurrenceRequest request =
-   *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
-   *           .setAttestor("attestor542920680")
-   *           .setAttestation(AttestationOccurrence.newBuilder().build())
-   *           .setOccurrenceNote("occurrenceNote1722072419")
-   *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
-   *           .build();
-   *   Service.ValidateAttestationOccurrenceResponse response =
-   *       validationHelperV1Client.validateAttestationOccurrence(request);
-   * }
-   * }
- * - * @param request The request object containing all of the parameters for the API call. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final Service.ValidateAttestationOccurrenceResponse validateAttestationOccurrence( - Service.ValidateAttestationOccurrenceRequest request) { - return validateAttestationOccurrenceCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Returns whether the given Attestation for the given image URI was signed by the given Attestor - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
-   *   Service.ValidateAttestationOccurrenceRequest request =
-   *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
-   *           .setAttestor("attestor542920680")
-   *           .setAttestation(AttestationOccurrence.newBuilder().build())
-   *           .setOccurrenceNote("occurrenceNote1722072419")
-   *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
-   *           .build();
-   *   ApiFuture future =
-   *       validationHelperV1Client.validateAttestationOccurrenceCallable().futureCall(request);
-   *   // Do something.
-   *   Service.ValidateAttestationOccurrenceResponse response = future.get();
-   * }
-   * }
- */ - public final UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable() { - return stub.validateAttestationOccurrenceCallable(); - } - - @Override - public final void close() { - stub.close(); - } - - @Override - public void shutdown() { - stub.shutdown(); - } - - @Override - public boolean isShutdown() { - return stub.isShutdown(); - } - - @Override - public boolean isTerminated() { - return stub.isTerminated(); - } - - @Override - public void shutdownNow() { - stub.shutdownNow(); - } - - @Override - public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { - return stub.awaitTermination(duration, unit); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java deleted file mode 100644 index 003984e8..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Settings.java +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; -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 ValidationHelperV1Client}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder =
- *     ValidationHelperV1Settings.newBuilder();
- * validationHelperV1SettingsBuilder
- *     .validateAttestationOccurrenceSettings()
- *     .setRetrySettings(
- *         validationHelperV1SettingsBuilder
- *             .validateAttestationOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ValidationHelperV1Settings validationHelperV1Settings =
- *     validationHelperV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ValidationHelperV1Settings extends ClientSettings { - - /** Returns the object with the settings used for calls to validateAttestationOccurrence. */ - public UnaryCallSettings< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings() { - return ((ValidationHelperV1StubSettings) getStubSettings()) - .validateAttestationOccurrenceSettings(); - } - - public static final ValidationHelperV1Settings create(ValidationHelperV1StubSettings stub) - throws IOException { - return new ValidationHelperV1Settings.Builder(stub.toBuilder()).build(); - } - - /** Returns a builder for the default ExecutorProvider for this service. */ - public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { - return ValidationHelperV1StubSettings.defaultExecutorProviderBuilder(); - } - - /** Returns the default service endpoint. */ - public static String getDefaultEndpoint() { - return ValidationHelperV1StubSettings.getDefaultEndpoint(); - } - - /** Returns the default service scopes. */ - public static List getDefaultServiceScopes() { - return ValidationHelperV1StubSettings.getDefaultServiceScopes(); - } - - /** Returns a builder for the default credentials for this service. */ - public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { - return ValidationHelperV1StubSettings.defaultCredentialsProviderBuilder(); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return ValidationHelperV1StubSettings.defaultGrpcTransportProviderBuilder(); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return ValidationHelperV1StubSettings.defaultHttpJsonTransportProviderBuilder(); - } - - public static TransportChannelProvider defaultTransportChannelProvider() { - return ValidationHelperV1StubSettings.defaultTransportChannelProvider(); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ValidationHelperV1StubSettings.defaultApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - @BetaApi - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 ValidationHelperV1Settings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - } - - /** Builder for ValidationHelperV1Settings. */ - public static class Builder extends ClientSettings.Builder { - - protected Builder() throws IOException { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(ValidationHelperV1StubSettings.newBuilder(clientContext)); - } - - protected Builder(ValidationHelperV1Settings settings) { - super(settings.getStubSettings().toBuilder()); - } - - protected Builder(ValidationHelperV1StubSettings.Builder stubSettings) { - super(stubSettings); - } - - private static Builder createDefault() { - return new Builder(ValidationHelperV1StubSettings.newBuilder()); - } - - @BetaApi - private static Builder createHttpJsonDefault() { - return new Builder(ValidationHelperV1StubSettings.newHttpJsonBuilder()); - } - - public ValidationHelperV1StubSettings.Builder getStubSettingsBuilder() { - return ((ValidationHelperV1StubSettings.Builder) getStubSettings()); - } - - /** - * 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) { - super.applyToAllUnaryMethods( - getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); - return this; - } - - /** Returns the builder for the settings used for calls to validateAttestationOccurrence. */ - public UnaryCallSettings.Builder< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings() { - return getStubSettingsBuilder().validateAttestationOccurrenceSettings(); - } - - @Override - public ValidationHelperV1Settings build() throws IOException { - return new ValidationHelperV1Settings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json deleted file mode 100644 index e5c1b6f2..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/gapic_metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "java", - "protoPackage": "google.cloud.binaryauthorization.v1", - "libraryPackage": "com.google.protos.google.cloud.binaryauthorization.v1", - "services": { - "BinauthzManagementServiceV1": { - "clients": { - "grpc": { - "libraryClient": "BinauthzManagementServiceV1Client", - "rpcs": { - "CreateAttestor": { - "methods": ["createAttestor", "createAttestor", "createAttestor", "createAttestorCallable"] - }, - "DeleteAttestor": { - "methods": ["deleteAttestor", "deleteAttestor", "deleteAttestor", "deleteAttestorCallable"] - }, - "GetAttestor": { - "methods": ["getAttestor", "getAttestor", "getAttestor", "getAttestorCallable"] - }, - "GetPolicy": { - "methods": ["getPolicy", "getPolicy", "getPolicy", "getPolicyCallable"] - }, - "ListAttestors": { - "methods": ["listAttestors", "listAttestors", "listAttestors", "listAttestorsPagedCallable", "listAttestorsCallable"] - }, - "UpdateAttestor": { - "methods": ["updateAttestor", "updateAttestor", "updateAttestorCallable"] - }, - "UpdatePolicy": { - "methods": ["updatePolicy", "updatePolicy", "updatePolicyCallable"] - } - } - } - } - }, - "SystemPolicyV1": { - "clients": { - "grpc": { - "libraryClient": "SystemPolicyV1Client", - "rpcs": { - "GetSystemPolicy": { - "methods": ["getSystemPolicy", "getSystemPolicy", "getSystemPolicy", "getSystemPolicyCallable"] - } - } - } - } - }, - "ValidationHelperV1": { - "clients": { - "grpc": { - "libraryClient": "ValidationHelperV1Client", - "rpcs": { - "ValidateAttestationOccurrence": { - "methods": ["validateAttestationOccurrence", "validateAttestationOccurrenceCallable"] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java deleted file mode 100644 index 6faf14df..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/package-info.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * A client to Binary Authorization API - * - *

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

======================= BinauthzManagementServiceV1Client ======================= - * - *

Service Description: Google Cloud Management Service for Binary Authorization admission - * policies and attestation authorities. - * - *

This API implements a REST model with the following objects: - * - *

    - *
  • [Policy][google.cloud.binaryauthorization.v1.Policy] - *
  • [Attestor][google.cloud.binaryauthorization.v1.Attestor] - *
- * - *

Sample for BinauthzManagementServiceV1Client: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client =
- *     BinauthzManagementServiceV1Client.create()) {
- *   PolicyName name = PolicyName.ofProjectName("[PROJECT]");
- *   Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name);
- * }
- * }
- * - *

======================= SystemPolicyV1Client ======================= - * - *

Service Description: API for working with the system policy. - * - *

Sample for SystemPolicyV1Client: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) {
- *   PolicyName name = PolicyName.ofLocationName("[LOCATION]");
- *   Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name);
- * }
- * }
- * - *

======================= ValidationHelperV1Client ======================= - * - *

Service Description: BinAuthz Attestor verification - * - *

Sample for ValidationHelperV1Client: - * - *

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) {
- *   Service.ValidateAttestationOccurrenceRequest request =
- *       Service.ValidateAttestationOccurrenceRequest.newBuilder()
- *           .setAttestor("attestor542920680")
- *           .setAttestation(AttestationOccurrence.newBuilder().build())
- *           .setOccurrenceNote("occurrenceNote1722072419")
- *           .setOccurrenceResourceUri("occurrenceResourceUri1001424877")
- *           .build();
- *   Service.ValidateAttestationOccurrenceResponse response =
- *       validationHelperV1Client.validateAttestationOccurrence(request);
- * }
- * }
- */ -@Generated("by gapic-generator-java") -package com.google.protos.google.cloud.binaryauthorization.v1; - -import javax.annotation.Generated; diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java deleted file mode 100644 index 9ebb4869..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1Stub.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the BinauthzManagementServiceV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class BinauthzManagementServiceV1Stub implements BackgroundResource { - - public UnaryCallable getPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getPolicyCallable()"); - } - - public UnaryCallable updatePolicyCallable() { - throw new UnsupportedOperationException("Not implemented: updatePolicyCallable()"); - } - - public UnaryCallable createAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: createAttestorCallable()"); - } - - public UnaryCallable getAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: getAttestorCallable()"); - } - - public UnaryCallable updateAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: updateAttestorCallable()"); - } - - public UnaryCallable - listAttestorsPagedCallable() { - throw new UnsupportedOperationException("Not implemented: listAttestorsPagedCallable()"); - } - - public UnaryCallable - listAttestorsCallable() { - throw new UnsupportedOperationException("Not implemented: listAttestorsCallable()"); - } - - public UnaryCallable deleteAttestorCallable() { - throw new UnsupportedOperationException("Not implemented: deleteAttestorCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java deleted file mode 100644 index 65cae21f..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/BinauthzManagementServiceV1StubSettings.java +++ /dev/null @@ -1,575 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -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.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -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.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 com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -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 BinauthzManagementServiceV1Stub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder =
- *     BinauthzManagementServiceV1StubSettings.newBuilder();
- * binauthzManagementServiceV1SettingsBuilder
- *     .getPolicySettings()
- *     .setRetrySettings(
- *         binauthzManagementServiceV1SettingsBuilder
- *             .getPolicySettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * BinauthzManagementServiceV1StubSettings binauthzManagementServiceV1Settings =
- *     binauthzManagementServiceV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class BinauthzManagementServiceV1StubSettings - 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 getPolicySettings; - private final UnaryCallSettings - updatePolicySettings; - private final UnaryCallSettings - createAttestorSettings; - private final UnaryCallSettings - getAttestorSettings; - private final UnaryCallSettings - updateAttestorSettings; - private final PagedCallSettings< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings; - private final UnaryCallSettings deleteAttestorSettings; - - private static final PagedListDescriptor< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor> - LIST_ATTESTORS_PAGE_STR_DESC = - new PagedListDescriptor< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, Resources.Attestor>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public Service.ListAttestorsRequest injectToken( - Service.ListAttestorsRequest payload, String token) { - return Service.ListAttestorsRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public Service.ListAttestorsRequest injectPageSize( - Service.ListAttestorsRequest payload, int pageSize) { - return Service.ListAttestorsRequest.newBuilder(payload).setPageSize(pageSize).build(); - } - - @Override - public Integer extractPageSize(Service.ListAttestorsRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(Service.ListAttestorsResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources( - Service.ListAttestorsResponse payload) { - return payload.getAttestorsList() == null - ? ImmutableList.of() - : payload.getAttestorsList(); - } - }; - - private static final PagedListResponseFactory< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - LIST_ATTESTORS_PAGE_STR_FACT = - new PagedListResponseFactory< - Service.ListAttestorsRequest, - Service.ListAttestorsResponse, - ListAttestorsPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable callable, - Service.ListAttestorsRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext< - Service.ListAttestorsRequest, - Service.ListAttestorsResponse, - Resources.Attestor> - pageContext = - PageContext.create(callable, LIST_ATTESTORS_PAGE_STR_DESC, request, context); - return ListAttestorsPagedResponse.createAsync(pageContext, futureResponse); - } - }; - - /** Returns the object with the settings used for calls to getPolicy. */ - public UnaryCallSettings getPolicySettings() { - return getPolicySettings; - } - - /** Returns the object with the settings used for calls to updatePolicy. */ - public UnaryCallSettings updatePolicySettings() { - return updatePolicySettings; - } - - /** Returns the object with the settings used for calls to createAttestor. */ - public UnaryCallSettings - createAttestorSettings() { - return createAttestorSettings; - } - - /** Returns the object with the settings used for calls to getAttestor. */ - public UnaryCallSettings getAttestorSettings() { - return getAttestorSettings; - } - - /** Returns the object with the settings used for calls to updateAttestor. */ - public UnaryCallSettings - updateAttestorSettings() { - return updateAttestorSettings; - } - - /** Returns the object with the settings used for calls to listAttestors. */ - public PagedCallSettings< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return listAttestorsSettings; - } - - /** Returns the object with the settings used for calls to deleteAttestor. */ - public UnaryCallSettings deleteAttestorSettings() { - return deleteAttestorSettings; - } - - public BinauthzManagementServiceV1Stub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcBinauthzManagementServiceV1Stub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonBinauthzManagementServiceV1Stub.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 "binaryauthorization.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "binaryauthorization.mtls.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) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(BinauthzManagementServiceV1StubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(BinauthzManagementServiceV1StubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return BinauthzManagementServiceV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 BinauthzManagementServiceV1StubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getPolicySettings = settingsBuilder.getPolicySettings().build(); - updatePolicySettings = settingsBuilder.updatePolicySettings().build(); - createAttestorSettings = settingsBuilder.createAttestorSettings().build(); - getAttestorSettings = settingsBuilder.getAttestorSettings().build(); - updateAttestorSettings = settingsBuilder.updateAttestorSettings().build(); - listAttestorsSettings = settingsBuilder.listAttestorsSettings().build(); - deleteAttestorSettings = settingsBuilder.deleteAttestorSettings().build(); - } - - /** Builder for BinauthzManagementServiceV1StubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - getPolicySettings; - private final UnaryCallSettings.Builder - updatePolicySettings; - private final UnaryCallSettings.Builder - createAttestorSettings; - private final UnaryCallSettings.Builder - getAttestorSettings; - private final UnaryCallSettings.Builder - updateAttestorSettings; - private final PagedCallSettings.Builder< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings; - private final UnaryCallSettings.Builder - deleteAttestorSettings; - 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.DEADLINE_EXCEEDED, StatusCode.Code.UNAVAILABLE))); - definitions.put( - "no_retry_1_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = - RetrySettings.newBuilder() - .setInitialRetryDelay(Duration.ofMillis(100L)) - .setRetryDelayMultiplier(1.3) - .setMaxRetryDelay(Duration.ofMillis(60000L)) - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("retry_policy_0_params", settings); - settings = - RetrySettings.newBuilder() - .setInitialRpcTimeout(Duration.ofMillis(600000L)) - .setRpcTimeoutMultiplier(1.0) - .setMaxRpcTimeout(Duration.ofMillis(600000L)) - .setTotalTimeout(Duration.ofMillis(600000L)) - .build(); - definitions.put("no_retry_1_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updatePolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - createAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - getAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - updateAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - listAttestorsSettings = PagedCallSettings.newBuilder(LIST_ATTESTORS_PAGE_STR_FACT); - deleteAttestorSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getPolicySettings, - updatePolicySettings, - createAttestorSettings, - getAttestorSettings, - updateAttestorSettings, - listAttestorsSettings, - deleteAttestorSettings); - initDefaults(this); - } - - protected Builder(BinauthzManagementServiceV1StubSettings settings) { - super(settings); - - getPolicySettings = settings.getPolicySettings.toBuilder(); - updatePolicySettings = settings.updatePolicySettings.toBuilder(); - createAttestorSettings = settings.createAttestorSettings.toBuilder(); - getAttestorSettings = settings.getAttestorSettings.toBuilder(); - updateAttestorSettings = settings.updateAttestorSettings.toBuilder(); - listAttestorsSettings = settings.listAttestorsSettings.toBuilder(); - deleteAttestorSettings = settings.deleteAttestorSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of( - getPolicySettings, - updatePolicySettings, - createAttestorSettings, - getAttestorSettings, - updateAttestorSettings, - listAttestorsSettings, - deleteAttestorSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updatePolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .createAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); - - builder - .getAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .updateAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .listAttestorsSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - builder - .deleteAttestorSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getPolicy. */ - public UnaryCallSettings.Builder - getPolicySettings() { - return getPolicySettings; - } - - /** Returns the builder for the settings used for calls to updatePolicy. */ - public UnaryCallSettings.Builder - updatePolicySettings() { - return updatePolicySettings; - } - - /** Returns the builder for the settings used for calls to createAttestor. */ - public UnaryCallSettings.Builder - createAttestorSettings() { - return createAttestorSettings; - } - - /** Returns the builder for the settings used for calls to getAttestor. */ - public UnaryCallSettings.Builder - getAttestorSettings() { - return getAttestorSettings; - } - - /** Returns the builder for the settings used for calls to updateAttestor. */ - public UnaryCallSettings.Builder - updateAttestorSettings() { - return updateAttestorSettings; - } - - /** Returns the builder for the settings used for calls to listAttestors. */ - public PagedCallSettings.Builder< - Service.ListAttestorsRequest, Service.ListAttestorsResponse, ListAttestorsPagedResponse> - listAttestorsSettings() { - return listAttestorsSettings; - } - - /** Returns the builder for the settings used for calls to deleteAttestor. */ - public UnaryCallSettings.Builder - deleteAttestorSettings() { - return deleteAttestorSettings; - } - - @Override - public BinauthzManagementServiceV1StubSettings build() throws IOException { - return new BinauthzManagementServiceV1StubSettings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java deleted file mode 100644 index 74cba666..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1CallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the BinauthzManagementServiceV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcBinauthzManagementServiceV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java deleted file mode 100644 index 8c7ae752..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcBinauthzManagementServiceV1Stub.java +++ /dev/null @@ -1,369 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -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.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the BinauthzManagementServiceV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcBinauthzManagementServiceV1Stub extends BinauthzManagementServiceV1Stub { - private static final MethodDescriptor - getPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.GetPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updatePolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.UpdatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - createAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.CreateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - getAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.GetAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - updateAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.UpdateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Attestor.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - listAttestorsMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.ListAttestorsRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(Service.ListAttestorsResponse.getDefaultInstance())) - .build(); - - private static final MethodDescriptor - deleteAttestorMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.DeleteAttestorRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) - .build(); - - private final UnaryCallable getPolicyCallable; - private final UnaryCallable updatePolicyCallable; - private final UnaryCallable - createAttestorCallable; - private final UnaryCallable getAttestorCallable; - private final UnaryCallable - updateAttestorCallable; - private final UnaryCallable - listAttestorsCallable; - private final UnaryCallable - listAttestorsPagedCallable; - private final UnaryCallable deleteAttestorCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcBinauthzManagementServiceV1Stub create( - BinauthzManagementServiceV1StubSettings settings) throws IOException { - return new GrpcBinauthzManagementServiceV1Stub(settings, ClientContext.create(settings)); - } - - public static final GrpcBinauthzManagementServiceV1Stub create(ClientContext clientContext) - throws IOException { - return new GrpcBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcBinauthzManagementServiceV1Stub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings.newBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcBinauthzManagementServiceV1CallableFactory()); - } - - /** - * Constructs an instance of GrpcBinauthzManagementServiceV1Stub, 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 GrpcBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings getPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings updatePolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updatePolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("policy.name", String.valueOf(request.getPolicy().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - createAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(createAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings getAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - updateAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(updateAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("attestor.name", String.valueOf(request.getAttestor().getName())); - return params.build(); - }) - .build(); - GrpcCallSettings - listAttestorsTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listAttestorsMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("parent", String.valueOf(request.getParent())); - return params.build(); - }) - .build(); - GrpcCallSettings deleteAttestorTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(deleteAttestorMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getPolicyCallable = - callableFactory.createUnaryCallable( - getPolicyTransportSettings, settings.getPolicySettings(), clientContext); - this.updatePolicyCallable = - callableFactory.createUnaryCallable( - updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); - this.createAttestorCallable = - callableFactory.createUnaryCallable( - createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); - this.getAttestorCallable = - callableFactory.createUnaryCallable( - getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); - this.updateAttestorCallable = - callableFactory.createUnaryCallable( - updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); - this.listAttestorsCallable = - callableFactory.createUnaryCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.listAttestorsPagedCallable = - callableFactory.createPagedCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.deleteAttestorCallable = - callableFactory.createUnaryCallable( - deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getPolicyCallable() { - return getPolicyCallable; - } - - @Override - public UnaryCallable updatePolicyCallable() { - return updatePolicyCallable; - } - - @Override - public UnaryCallable createAttestorCallable() { - return createAttestorCallable; - } - - @Override - public UnaryCallable getAttestorCallable() { - return getAttestorCallable; - } - - @Override - public UnaryCallable updateAttestorCallable() { - return updateAttestorCallable; - } - - @Override - public UnaryCallable - listAttestorsCallable() { - return listAttestorsCallable; - } - - @Override - public UnaryCallable - listAttestorsPagedCallable() { - return listAttestorsPagedCallable; - } - - @Override - public UnaryCallable deleteAttestorCallable() { - return deleteAttestorCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java deleted file mode 100644 index 6e35b13d..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1CallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the SystemPolicyV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcSystemPolicyV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java deleted file mode 100644 index 1df22e1a..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcSystemPolicyV1Stub.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -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.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the SystemPolicyV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcSystemPolicyV1Stub extends SystemPolicyV1Stub { - private static final MethodDescriptor - getSystemPolicyMethodDescriptor = - MethodDescriptor.newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy") - .setRequestMarshaller( - ProtoUtils.marshaller(Service.GetSystemPolicyRequest.getDefaultInstance())) - .setResponseMarshaller(ProtoUtils.marshaller(Resources.Policy.getDefaultInstance())) - .build(); - - private final UnaryCallable - getSystemPolicyCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcSystemPolicyV1Stub create(SystemPolicyV1StubSettings settings) - throws IOException { - return new GrpcSystemPolicyV1Stub(settings, ClientContext.create(settings)); - } - - public static final GrpcSystemPolicyV1Stub create(ClientContext clientContext) - throws IOException { - return new GrpcSystemPolicyV1Stub( - SystemPolicyV1StubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcSystemPolicyV1Stub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcSystemPolicyV1Stub( - SystemPolicyV1StubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcSystemPolicyV1Stub, 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 GrpcSystemPolicyV1Stub(SystemPolicyV1StubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new GrpcSystemPolicyV1CallableFactory()); - } - - /** - * Constructs an instance of GrpcSystemPolicyV1Stub, 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 GrpcSystemPolicyV1Stub( - SystemPolicyV1StubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings - getSystemPolicyTransportSettings = - GrpcCallSettings.newBuilder() - .setMethodDescriptor(getSystemPolicyMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("name", String.valueOf(request.getName())); - return params.build(); - }) - .build(); - - this.getSystemPolicyCallable = - callableFactory.createUnaryCallable( - getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable getSystemPolicyCallable() { - return getSystemPolicyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java deleted file mode 100644 index c870efbb..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1CallableFactory.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.gax.grpc.GrpcCallSettings; -import com.google.api.gax.grpc.GrpcCallableFactory; -import com.google.api.gax.grpc.GrpcStubCallableFactory; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.BidiStreamingCallable; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.ClientStreamingCallable; -import com.google.api.gax.rpc.OperationCallSettings; -import com.google.api.gax.rpc.OperationCallable; -import com.google.api.gax.rpc.PagedCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallSettings; -import com.google.api.gax.rpc.ServerStreamingCallable; -import com.google.api.gax.rpc.StreamingCallSettings; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import com.google.longrunning.stub.OperationsStub; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC callable factory implementation for the ValidationHelperV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -public class GrpcValidationHelperV1CallableFactory 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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java deleted file mode 100644 index 33f91e6d..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/GrpcValidationHelperV1Stub.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -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.UnaryCallable; -import com.google.common.collect.ImmutableMap; -import com.google.longrunning.stub.GrpcOperationsStub; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import io.grpc.MethodDescriptor; -import io.grpc.protobuf.ProtoUtils; -import java.io.IOException; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * gRPC stub implementation for the ValidationHelperV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public class GrpcValidationHelperV1Stub extends ValidationHelperV1Stub { - private static final MethodDescriptor< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceMethodDescriptor = - MethodDescriptor - . - newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - "google.cloud.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence") - .setRequestMarshaller( - ProtoUtils.marshaller( - Service.ValidateAttestationOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller( - Service.ValidateAttestationOccurrenceResponse.getDefaultInstance())) - .build(); - - private final UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable; - - private final BackgroundResource backgroundResources; - private final GrpcOperationsStub operationsStub; - private final GrpcStubCallableFactory callableFactory; - - public static final GrpcValidationHelperV1Stub create(ValidationHelperV1StubSettings settings) - throws IOException { - return new GrpcValidationHelperV1Stub(settings, ClientContext.create(settings)); - } - - public static final GrpcValidationHelperV1Stub create(ClientContext clientContext) - throws IOException { - return new GrpcValidationHelperV1Stub( - ValidationHelperV1StubSettings.newBuilder().build(), clientContext); - } - - public static final GrpcValidationHelperV1Stub create( - ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { - return new GrpcValidationHelperV1Stub( - ValidationHelperV1StubSettings.newBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of GrpcValidationHelperV1Stub, 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 GrpcValidationHelperV1Stub( - ValidationHelperV1StubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new GrpcValidationHelperV1CallableFactory()); - } - - /** - * Constructs an instance of GrpcValidationHelperV1Stub, 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 GrpcValidationHelperV1Stub( - ValidationHelperV1StubSettings settings, - ClientContext clientContext, - GrpcStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); - - GrpcCallSettings< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceTransportSettings = - GrpcCallSettings - . - newBuilder() - .setMethodDescriptor(validateAttestationOccurrenceMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("attestor", String.valueOf(request.getAttestor())); - return params.build(); - }) - .build(); - - this.validateAttestationOccurrenceCallable = - callableFactory.createUnaryCallable( - validateAttestationOccurrenceTransportSettings, - settings.validateAttestationOccurrenceSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - public GrpcOperationsStub getOperationsStub() { - return operationsStub; - } - - @Override - public UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable() { - return validateAttestationOccurrenceCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java deleted file mode 100644 index 256e2744..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1CallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the BinauthzManagementServiceV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonBinauthzManagementServiceV1CallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java deleted file mode 100644 index 90721e87..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonBinauthzManagementServiceV1Stub.java +++ /dev/null @@ -1,529 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.Empty; -import com.google.protobuf.TypeRegistry; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the BinauthzManagementServiceV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonBinauthzManagementServiceV1Stub extends BinauthzManagementServiceV1Stub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - getPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updatePolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdatePolicy") - .setHttpMethod("PUT") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{policy.name=projects/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "policy.name", request.getPolicy().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("policy", request.getPolicy(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - createAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/CreateAttestor") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*}/attestors", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "attestorId", request.getAttestorId()); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("attestor", request.getAttestor(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - getAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/GetAttestor") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - updateAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/UpdateAttestor") - .setHttpMethod("PUT") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{attestor.name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "attestor.name", request.getAttestor().getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("attestor", request.getAttestor(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Attestor.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor< - Service.ListAttestorsRequest, Service.ListAttestorsResponse> - listAttestorsMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/ListAttestors") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{parent=projects/*}/attestors", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "parent", request.getParent()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Service.ListAttestorsResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private static final ApiMethodDescriptor - deleteAttestorMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1/DeleteAttestor") - .setHttpMethod("DELETE") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=projects/*/attestors/*}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Empty.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable getPolicyCallable; - private final UnaryCallable updatePolicyCallable; - private final UnaryCallable - createAttestorCallable; - private final UnaryCallable getAttestorCallable; - private final UnaryCallable - updateAttestorCallable; - private final UnaryCallable - listAttestorsCallable; - private final UnaryCallable - listAttestorsPagedCallable; - private final UnaryCallable deleteAttestorCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonBinauthzManagementServiceV1Stub create( - BinauthzManagementServiceV1StubSettings settings) throws IOException { - return new HttpJsonBinauthzManagementServiceV1Stub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonBinauthzManagementServiceV1Stub create(ClientContext clientContext) - throws IOException { - return new HttpJsonBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonBinauthzManagementServiceV1Stub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonBinauthzManagementServiceV1Stub, 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 HttpJsonBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings settings, ClientContext clientContext) - throws IOException { - this(settings, clientContext, new HttpJsonBinauthzManagementServiceV1CallableFactory()); - } - - /** - * Constructs an instance of HttpJsonBinauthzManagementServiceV1Stub, 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 HttpJsonBinauthzManagementServiceV1Stub( - BinauthzManagementServiceV1StubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings getPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updatePolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updatePolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - createAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(createAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - getAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - updateAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(updateAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings - listAttestorsTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listAttestorsMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - HttpJsonCallSettings deleteAttestorTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(deleteAttestorMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.getPolicyCallable = - callableFactory.createUnaryCallable( - getPolicyTransportSettings, settings.getPolicySettings(), clientContext); - this.updatePolicyCallable = - callableFactory.createUnaryCallable( - updatePolicyTransportSettings, settings.updatePolicySettings(), clientContext); - this.createAttestorCallable = - callableFactory.createUnaryCallable( - createAttestorTransportSettings, settings.createAttestorSettings(), clientContext); - this.getAttestorCallable = - callableFactory.createUnaryCallable( - getAttestorTransportSettings, settings.getAttestorSettings(), clientContext); - this.updateAttestorCallable = - callableFactory.createUnaryCallable( - updateAttestorTransportSettings, settings.updateAttestorSettings(), clientContext); - this.listAttestorsCallable = - callableFactory.createUnaryCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.listAttestorsPagedCallable = - callableFactory.createPagedCallable( - listAttestorsTransportSettings, settings.listAttestorsSettings(), clientContext); - this.deleteAttestorCallable = - callableFactory.createUnaryCallable( - deleteAttestorTransportSettings, settings.deleteAttestorSettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(getPolicyMethodDescriptor); - methodDescriptors.add(updatePolicyMethodDescriptor); - methodDescriptors.add(createAttestorMethodDescriptor); - methodDescriptors.add(getAttestorMethodDescriptor); - methodDescriptors.add(updateAttestorMethodDescriptor); - methodDescriptors.add(listAttestorsMethodDescriptor); - methodDescriptors.add(deleteAttestorMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable getPolicyCallable() { - return getPolicyCallable; - } - - @Override - public UnaryCallable updatePolicyCallable() { - return updatePolicyCallable; - } - - @Override - public UnaryCallable createAttestorCallable() { - return createAttestorCallable; - } - - @Override - public UnaryCallable getAttestorCallable() { - return getAttestorCallable; - } - - @Override - public UnaryCallable updateAttestorCallable() { - return updateAttestorCallable; - } - - @Override - public UnaryCallable - listAttestorsCallable() { - return listAttestorsCallable; - } - - @Override - public UnaryCallable - listAttestorsPagedCallable() { - return listAttestorsPagedCallable; - } - - @Override - public UnaryCallable deleteAttestorCallable() { - return deleteAttestorCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java deleted file mode 100644 index 91c421ef..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1CallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the SystemPolicyV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonSystemPolicyV1CallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java deleted file mode 100644 index 7d357f02..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonSystemPolicyV1Stub.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.TypeRegistry; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the SystemPolicyV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonSystemPolicyV1Stub extends SystemPolicyV1Stub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor - getSystemPolicyMethodDescriptor = - ApiMethodDescriptor.newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.SystemPolicyV1/GetSystemPolicy") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v1/{name=locations/*/policy}", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam(fields, "name", request.getName()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(Resources.Policy.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable - getSystemPolicyCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonSystemPolicyV1Stub create(SystemPolicyV1StubSettings settings) - throws IOException { - return new HttpJsonSystemPolicyV1Stub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonSystemPolicyV1Stub create(ClientContext clientContext) - throws IOException { - return new HttpJsonSystemPolicyV1Stub( - SystemPolicyV1StubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonSystemPolicyV1Stub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonSystemPolicyV1Stub( - SystemPolicyV1StubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); - } - - /** - * Constructs an instance of HttpJsonSystemPolicyV1Stub, 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 HttpJsonSystemPolicyV1Stub( - SystemPolicyV1StubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonSystemPolicyV1CallableFactory()); - } - - /** - * Constructs an instance of HttpJsonSystemPolicyV1Stub, 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 HttpJsonSystemPolicyV1Stub( - SystemPolicyV1StubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings - getSystemPolicyTransportSettings = - HttpJsonCallSettings.newBuilder() - .setMethodDescriptor(getSystemPolicyMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.getSystemPolicyCallable = - callableFactory.createUnaryCallable( - getSystemPolicyTransportSettings, settings.getSystemPolicySettings(), clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(getSystemPolicyMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable getSystemPolicyCallable() { - return getSystemPolicyCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java deleted file mode 100644 index 83c6e2e1..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1CallableFactory.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonCallableFactory; -import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; -import com.google.api.gax.rpc.BatchingCallSettings; -import com.google.api.gax.rpc.ClientContext; -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.UnaryCallSettings; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.longrunning.Operation; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST callable factory implementation for the ValidationHelperV1 service API. - * - *

This class is for advanced usage. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonValidationHelperV1CallableFactory - implements HttpJsonStubCallableFactory { - - @Override - public UnaryCallable createUnaryCallable( - HttpJsonCallSettings httpJsonCallSettings, - UnaryCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createUnaryCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public - UnaryCallable createPagedCallable( - HttpJsonCallSettings httpJsonCallSettings, - PagedCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createPagedCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @Override - public UnaryCallable createBatchingCallable( - HttpJsonCallSettings httpJsonCallSettings, - BatchingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createBatchingCallable( - httpJsonCallSettings, callSettings, clientContext); - } - - @BetaApi( - "The surface for long-running operations is not stable yet and may change in the future.") - @Override - public - OperationCallable createOperationCallable( - HttpJsonCallSettings httpJsonCallSettings, - OperationCallSettings callSettings, - ClientContext clientContext, - OperationsStub operationsStub) { - UnaryCallable innerCallable = - HttpJsonCallableFactory.createBaseUnaryCallable( - httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); - HttpJsonOperationSnapshotCallable initialCallable = - new HttpJsonOperationSnapshotCallable( - innerCallable, - httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); - return HttpJsonCallableFactory.createOperationCallable( - callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); - } - - @Override - public - ServerStreamingCallable createServerStreamingCallable( - HttpJsonCallSettings httpJsonCallSettings, - ServerStreamingCallSettings callSettings, - ClientContext clientContext) { - return HttpJsonCallableFactory.createServerStreamingCallable( - httpJsonCallSettings, callSettings, clientContext); - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java deleted file mode 100644 index 8a83baa6..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/HttpJsonValidationHelperV1Stub.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.BetaApi; -import com.google.api.core.InternalApi; -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.core.BackgroundResourceAggregation; -import com.google.api.gax.httpjson.ApiMethodDescriptor; -import com.google.api.gax.httpjson.HttpJsonCallSettings; -import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; -import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; -import com.google.api.gax.httpjson.ProtoMessageResponseParser; -import com.google.api.gax.httpjson.ProtoRestSerializer; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protobuf.TypeRegistry; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * REST stub implementation for the ValidationHelperV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -@BetaApi -public class HttpJsonValidationHelperV1Stub extends ValidationHelperV1Stub { - private static final TypeRegistry typeRegistry = TypeRegistry.newBuilder().build(); - - private static final ApiMethodDescriptor< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceMethodDescriptor = - ApiMethodDescriptor - . - newBuilder() - .setFullMethodName( - "google.cloud.binaryauthorization.v1.ValidationHelperV1/ValidateAttestationOccurrence") - .setHttpMethod("POST") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter - .newBuilder() - .setPath( - "/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - serializer.putPathParam(fields, "attestor", request.getAttestor()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer - serializer = ProtoRestSerializer.create(); - return fields; - }) - .setRequestBodyExtractor( - request -> - ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearAttestor().build(), false)) - .build()) - .setResponseParser( - ProtoMessageResponseParser - .newBuilder() - .setDefaultInstance( - Service.ValidateAttestationOccurrenceResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - - private final UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable; - - private final BackgroundResource backgroundResources; - private final HttpJsonStubCallableFactory callableFactory; - - public static final HttpJsonValidationHelperV1Stub create(ValidationHelperV1StubSettings settings) - throws IOException { - return new HttpJsonValidationHelperV1Stub(settings, ClientContext.create(settings)); - } - - public static final HttpJsonValidationHelperV1Stub create(ClientContext clientContext) - throws IOException { - return new HttpJsonValidationHelperV1Stub( - ValidationHelperV1StubSettings.newHttpJsonBuilder().build(), clientContext); - } - - public static final HttpJsonValidationHelperV1Stub create( - ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { - return new HttpJsonValidationHelperV1Stub( - ValidationHelperV1StubSettings.newHttpJsonBuilder().build(), - clientContext, - callableFactory); - } - - /** - * Constructs an instance of HttpJsonValidationHelperV1Stub, 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 HttpJsonValidationHelperV1Stub( - ValidationHelperV1StubSettings settings, ClientContext clientContext) throws IOException { - this(settings, clientContext, new HttpJsonValidationHelperV1CallableFactory()); - } - - /** - * Constructs an instance of HttpJsonValidationHelperV1Stub, 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 HttpJsonValidationHelperV1Stub( - ValidationHelperV1StubSettings settings, - ClientContext clientContext, - HttpJsonStubCallableFactory callableFactory) - throws IOException { - this.callableFactory = callableFactory; - - HttpJsonCallSettings< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceTransportSettings = - HttpJsonCallSettings - . - newBuilder() - .setMethodDescriptor(validateAttestationOccurrenceMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); - - this.validateAttestationOccurrenceCallable = - callableFactory.createUnaryCallable( - validateAttestationOccurrenceTransportSettings, - settings.validateAttestationOccurrenceSettings(), - clientContext); - - this.backgroundResources = - new BackgroundResourceAggregation(clientContext.getBackgroundResources()); - } - - @InternalApi - public static List getMethodDescriptors() { - List methodDescriptors = new ArrayList<>(); - methodDescriptors.add(validateAttestationOccurrenceMethodDescriptor); - return methodDescriptors; - } - - @Override - public UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable() { - return validateAttestationOccurrenceCallable; - } - - @Override - public final void close() { - try { - backgroundResources.close(); - } catch (RuntimeException e) { - throw e; - } catch (Exception e) { - throw new IllegalStateException("Failed to close resource", e); - } - } - - @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-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java deleted file mode 100644 index 1431fc19..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1Stub.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the SystemPolicyV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class SystemPolicyV1Stub implements BackgroundResource { - - public UnaryCallable getSystemPolicyCallable() { - throw new UnsupportedOperationException("Not implemented: getSystemPolicyCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java deleted file mode 100644 index d01390bd..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/SystemPolicyV1StubSettings.java +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -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 SystemPolicyV1Stub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder =
- *     SystemPolicyV1StubSettings.newBuilder();
- * systemPolicyV1SettingsBuilder
- *     .getSystemPolicySettings()
- *     .setRetrySettings(
- *         systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class SystemPolicyV1StubSettings 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 - getSystemPolicySettings; - - /** Returns the object with the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings - getSystemPolicySettings() { - return getSystemPolicySettings; - } - - public SystemPolicyV1Stub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcSystemPolicyV1Stub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonSystemPolicyV1Stub.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 "binaryauthorization.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "binaryauthorization.mtls.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) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1StubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(SystemPolicyV1StubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return SystemPolicyV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 SystemPolicyV1StubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - getSystemPolicySettings = settingsBuilder.getSystemPolicySettings().build(); - } - - /** Builder for SystemPolicyV1StubSettings. */ - public static class Builder extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder - getSystemPolicySettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - getSystemPolicySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(getSystemPolicySettings); - initDefaults(this); - } - - protected Builder(SystemPolicyV1StubSettings settings) { - super(settings); - - getSystemPolicySettings = settings.getSystemPolicySettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(getSystemPolicySettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .getSystemPolicySettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to getSystemPolicy. */ - public UnaryCallSettings.Builder - getSystemPolicySettings() { - return getSystemPolicySettings; - } - - @Override - public SystemPolicyV1StubSettings build() throws IOException { - return new SystemPolicyV1StubSettings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java deleted file mode 100644 index b02b3df3..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1Stub.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.gax.core.BackgroundResource; -import com.google.api.gax.rpc.UnaryCallable; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -/** - * Base stub class for the ValidationHelperV1 service API. - * - *

This class is for advanced usage and reflects the underlying API directly. - */ -@Generated("by gapic-generator-java") -public abstract class ValidationHelperV1Stub implements BackgroundResource { - - public UnaryCallable< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceCallable() { - throw new UnsupportedOperationException( - "Not implemented: validateAttestationOccurrenceCallable()"); - } - - @Override - public abstract void close(); -} diff --git a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java b/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java deleted file mode 100644 index cbed6153..00000000 --- a/google-cloud-binary-authorization/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/stub/ValidationHelperV1StubSettings.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub; - -import com.google.api.core.ApiFunction; -import com.google.api.core.BetaApi; -import com.google.api.gax.core.GaxProperties; -import com.google.api.gax.core.GoogleCredentialsProvider; -import com.google.api.gax.core.InstantiatingExecutorProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.GrpcTransportChannel; -import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.HttpJsonTransportChannel; -import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; -import com.google.api.gax.retrying.RetrySettings; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ClientContext; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.StubSettings; -import com.google.api.gax.rpc.TransportChannelProvider; -import com.google.api.gax.rpc.UnaryCallSettings; -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableSet; -import com.google.common.collect.Lists; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -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 ValidationHelperV1Stub}. - * - *

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

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

{@code
- * // This snippet has been automatically generated and should be regarded as a code template only.
- * // It will require modifications to work:
- * // - It may require correct/in-range values for request initialization.
- * // - It may require specifying regional endpoints when creating the service client as shown in
- * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
- * ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder =
- *     ValidationHelperV1StubSettings.newBuilder();
- * validationHelperV1SettingsBuilder
- *     .validateAttestationOccurrenceSettings()
- *     .setRetrySettings(
- *         validationHelperV1SettingsBuilder
- *             .validateAttestationOccurrenceSettings()
- *             .getRetrySettings()
- *             .toBuilder()
- *             .setTotalTimeout(Duration.ofSeconds(30))
- *             .build());
- * ValidationHelperV1StubSettings validationHelperV1Settings =
- *     validationHelperV1SettingsBuilder.build();
- * }
- */ -@Generated("by gapic-generator-java") -public class ValidationHelperV1StubSettings 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< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings; - - /** Returns the object with the settings used for calls to validateAttestationOccurrence. */ - public UnaryCallSettings< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings() { - return validateAttestationOccurrenceSettings; - } - - public ValidationHelperV1Stub createStub() throws IOException { - if (getTransportChannelProvider() - .getTransportName() - .equals(GrpcTransportChannel.getGrpcTransportName())) { - return GrpcValidationHelperV1Stub.create(this); - } - if (getTransportChannelProvider() - .getTransportName() - .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { - return HttpJsonValidationHelperV1Stub.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 "binaryauthorization.googleapis.com:443"; - } - - /** Returns the default mTLS service endpoint. */ - public static String getDefaultMtlsEndpoint() { - return "binaryauthorization.mtls.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) - .setUseJwtAccessWithScope(true); - } - - /** Returns a builder for the default gRPC ChannelProvider for this service. */ - public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { - return InstantiatingGrpcChannelProvider.newBuilder() - .setMaxInboundMessageSize(Integer.MAX_VALUE); - } - - /** Returns a builder for the default REST ChannelProvider for this service. */ - @BetaApi - public static InstantiatingHttpJsonChannelProvider.Builder - defaultHttpJsonTransportProviderBuilder() { - return InstantiatingHttpJsonChannelProvider.newBuilder(); - } - - 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 defaultGrpcApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ValidationHelperV1StubSettings.class)) - .setTransportToken( - GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); - } - - @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") - public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { - return ApiClientHeaderProvider.newBuilder() - .setGeneratedLibToken( - "gapic", GaxProperties.getLibraryVersion(ValidationHelperV1StubSettings.class)) - .setTransportToken( - GaxHttpJsonProperties.getHttpJsonTokenName(), - GaxHttpJsonProperties.getHttpJsonVersion()); - } - - public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { - return ValidationHelperV1StubSettings.defaultGrpcApiClientHeaderProviderBuilder(); - } - - /** Returns a new gRPC builder for this class. */ - public static Builder newBuilder() { - return Builder.createDefault(); - } - - /** Returns a new REST builder for this class. */ - public static Builder newHttpJsonBuilder() { - return Builder.createHttpJsonDefault(); - } - - /** 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 ValidationHelperV1StubSettings(Builder settingsBuilder) throws IOException { - super(settingsBuilder); - - validateAttestationOccurrenceSettings = - settingsBuilder.validateAttestationOccurrenceSettings().build(); - } - - /** Builder for ValidationHelperV1StubSettings. */ - public static class Builder - extends StubSettings.Builder { - private final ImmutableList> unaryMethodSettingsBuilders; - private final UnaryCallSettings.Builder< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings; - private static final ImmutableMap> - RETRYABLE_CODE_DEFINITIONS; - - static { - ImmutableMap.Builder> definitions = - ImmutableMap.builder(); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); - RETRYABLE_CODE_DEFINITIONS = definitions.build(); - } - - private static final ImmutableMap RETRY_PARAM_DEFINITIONS; - - static { - ImmutableMap.Builder definitions = ImmutableMap.builder(); - RetrySettings settings = null; - settings = RetrySettings.newBuilder().setRpcTimeoutMultiplier(1.0).build(); - definitions.put("no_retry_params", settings); - RETRY_PARAM_DEFINITIONS = definitions.build(); - } - - protected Builder() { - this(((ClientContext) null)); - } - - protected Builder(ClientContext clientContext) { - super(clientContext); - - validateAttestationOccurrenceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(validateAttestationOccurrenceSettings); - initDefaults(this); - } - - protected Builder(ValidationHelperV1StubSettings settings) { - super(settings); - - validateAttestationOccurrenceSettings = - settings.validateAttestationOccurrenceSettings.toBuilder(); - - unaryMethodSettingsBuilders = - ImmutableList.>of(validateAttestationOccurrenceSettings); - } - - private static Builder createDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultTransportChannelProvider()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder createHttpJsonDefault() { - Builder builder = new Builder(((ClientContext) null)); - - builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); - builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); - builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); - builder.setEndpoint(getDefaultEndpoint()); - builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); - builder.setSwitchToMtlsEndpointAllowed(true); - - return initDefaults(builder); - } - - private static Builder initDefaults(Builder builder) { - builder - .validateAttestationOccurrenceSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - - return builder; - } - - /** - * 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) { - super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); - return this; - } - - public ImmutableList> unaryMethodSettingsBuilders() { - return unaryMethodSettingsBuilders; - } - - /** Returns the builder for the settings used for calls to validateAttestationOccurrence. */ - public UnaryCallSettings.Builder< - Service.ValidateAttestationOccurrenceRequest, - Service.ValidateAttestationOccurrenceResponse> - validateAttestationOccurrenceSettings() { - return validateAttestationOccurrenceSettings; - } - - @Override - public ValidationHelperV1StubSettings build() throws IOException { - return new ValidationHelperV1StubSettings(this); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java deleted file mode 100644 index baa6615d..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientHttpJsonTest.java +++ /dev/null @@ -1,687 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.binaryauthorization.v1beta1.stub.HttpJsonBinauthzManagementServiceV1Beta1Stub; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -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 BinauthzManagementServiceV1Beta1ClientHttpJsonTest { - private static MockHttpService mockService; - private static BinauthzManagementServiceV1Beta1Client client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonBinauthzManagementServiceV1Beta1Stub.getMethodDescriptors(), - BinauthzManagementServiceV1Beta1Settings.getDefaultEndpoint()); - BinauthzManagementServiceV1Beta1Settings settings = - BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder() - .setTransportChannelProvider( - BinauthzManagementServiceV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = BinauthzManagementServiceV1Beta1Client.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void getPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - - Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-415/policy"; - - Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-415/policy"; - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updatePolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Policy policy = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - - Policy actualResponse = client.updatePolicy(policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updatePolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Policy policy = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - client.updatePolicy(policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - - Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest2() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - - Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest2() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2729/attestors/attestor-2729"; - - Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2729/attestors/attestor-2729"; - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Attestor attestor = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - - Attestor actualResponse = client.updateAttestor(attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Attestor attestor = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - client.updateAttestor(attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest() throws Exception { - Attestor responsesElement = Attestor.newBuilder().build(); - ListAttestorsResponse expectedResponse = - ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAttestorsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest2() throws Exception { - Attestor responsesElement = Attestor.newBuilder().build(); - ListAttestorsResponse expectedResponse = - ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAttestorsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - client.deleteAttestor(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2729/attestors/attestor-2729"; - - client.deleteAttestor(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2729/attestors/attestor-2729"; - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java deleted file mode 100644 index 1811efbd..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1ClientTest.java +++ /dev/null @@ -1,591 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import static com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client.ListAttestorsPagedResponse; - -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.Empty; -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 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 BinauthzManagementServiceV1Beta1ClientTest { - private static MockBinauthzManagementServiceV1Beta1 mockBinauthzManagementServiceV1Beta1; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private BinauthzManagementServiceV1Beta1Client client; - - @BeforeClass - public static void startStaticServer() { - mockBinauthzManagementServiceV1Beta1 = new MockBinauthzManagementServiceV1Beta1(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockBinauthzManagementServiceV1Beta1)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - BinauthzManagementServiceV1Beta1Settings settings = - BinauthzManagementServiceV1Beta1Settings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = BinauthzManagementServiceV1Beta1Client.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - - Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetPolicyRequest actualRequest = ((GetPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - String name = "name3373707"; - - Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetPolicyRequest actualRequest = ((GetPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - String name = "name3373707"; - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updatePolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - Policy policy = Policy.newBuilder().build(); - - Policy actualResponse = client.updatePolicy(policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdatePolicyRequest actualRequest = ((UpdatePolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updatePolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - Policy policy = Policy.newBuilder().build(); - client.updatePolicy(policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - - Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateAttestorRequest actualRequest = ((CreateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(attestorId, actualRequest.getAttestorId()); - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest2() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - - Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - CreateAttestorRequest actualRequest = ((CreateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(attestorId, actualRequest.getAttestorId()); - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - String parent = "parent-995424086"; - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAttestorRequest actualRequest = ((GetAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest2() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - String name = "name3373707"; - - Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetAttestorRequest actualRequest = ((GetAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - String name = "name3373707"; - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateAttestorTest() throws Exception { - Attestor expectedResponse = - Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - Attestor attestor = Attestor.newBuilder().build(); - - Attestor actualResponse = client.updateAttestor(attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - UpdateAttestorRequest actualRequest = ((UpdateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - Attestor attestor = Attestor.newBuilder().build(); - client.updateAttestor(attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest() throws Exception { - Attestor responsesElement = Attestor.newBuilder().build(); - ListAttestorsResponse expectedResponse = - ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAttestorsRequest actualRequest = ((ListAttestorsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAttestorsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest2() throws Exception { - Attestor responsesElement = Attestor.newBuilder().build(); - ListAttestorsResponse expectedResponse = - ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListAttestorsRequest actualRequest = ((ListAttestorsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAttestorsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - String parent = "parent-995424086"; - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - client.deleteAttestor(name); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteAttestorRequest actualRequest = ((DeleteAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBinauthzManagementServiceV1Beta1.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteAttestor(name); - - List actualRequests = mockBinauthzManagementServiceV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - DeleteAttestorRequest actualRequest = ((DeleteAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1Beta1.addException(exception); - - try { - String name = "name3373707"; - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java deleted file mode 100644 index 4f306374..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockBinauthzManagementServiceV1Beta1 implements MockGrpcService { - private final MockBinauthzManagementServiceV1Beta1Impl serviceImpl; - - public MockBinauthzManagementServiceV1Beta1() { - serviceImpl = new MockBinauthzManagementServiceV1Beta1Impl(); - } - - @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-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java deleted file mode 100644 index cccfff48..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockBinauthzManagementServiceV1Beta1Impl.java +++ /dev/null @@ -1,206 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Grpc.BinauthzManagementServiceV1Beta1ImplBase; -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 MockBinauthzManagementServiceV1Beta1Impl - extends BinauthzManagementServiceV1Beta1ImplBase { - private List requests; - private Queue responses; - - public MockBinauthzManagementServiceV1Beta1Impl() { - 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 getPolicy(GetPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 GetPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updatePolicy(UpdatePolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 UpdatePolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createAttestor( - CreateAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Attestor) { - requests.add(request); - responseObserver.onNext(((Attestor) 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 CreateAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getAttestor(GetAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Attestor) { - requests.add(request); - responseObserver.onNext(((Attestor) 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 GetAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateAttestor( - UpdateAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Attestor) { - requests.add(request); - responseObserver.onNext(((Attestor) 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 UpdateAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listAttestors( - ListAttestorsRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListAttestorsResponse) { - requests.add(request); - responseObserver.onNext(((ListAttestorsResponse) 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 ListAttestors, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListAttestorsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteAttestor( - DeleteAttestorRequest 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 DeleteAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java deleted file mode 100644 index 9c5a53c6..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockSystemPolicyV1Beta1 implements MockGrpcService { - private final MockSystemPolicyV1Beta1Impl serviceImpl; - - public MockSystemPolicyV1Beta1() { - serviceImpl = new MockSystemPolicyV1Beta1Impl(); - } - - @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-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java deleted file mode 100644 index c61ba91b..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/MockSystemPolicyV1Beta1Impl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Grpc.SystemPolicyV1Beta1ImplBase; -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 MockSystemPolicyV1Beta1Impl extends SystemPolicyV1Beta1ImplBase { - private List requests; - private Queue responses; - - public MockSystemPolicyV1Beta1Impl() { - 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 getSystemPolicy( - GetSystemPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Policy) { - requests.add(request); - responseObserver.onNext(((Policy) 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 GetSystemPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Policy.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java deleted file mode 100644 index fb1cb04d..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientHttpJsonTest.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.cloud.binaryauthorization.v1beta1.stub.HttpJsonSystemPolicyV1Beta1Stub; -import com.google.protobuf.Timestamp; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -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 SystemPolicyV1Beta1ClientHttpJsonTest { - private static MockHttpService mockService; - private static SystemPolicyV1Beta1Client client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonSystemPolicyV1Beta1Stub.getMethodDescriptors(), - SystemPolicyV1Beta1Settings.getDefaultEndpoint()); - SystemPolicyV1Beta1Settings settings = - SystemPolicyV1Beta1Settings.newHttpJsonBuilder() - .setTransportChannelProvider( - SystemPolicyV1Beta1Settings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SystemPolicyV1Beta1Client.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void getSystemPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - - Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSystemPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSystemPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "locations/location-9731/policy"; - - Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSystemPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "locations/location-9731/policy"; - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java deleted file mode 100644 index 01d53e3b..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1ClientTest.java +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -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.protobuf.AbstractMessage; -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 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 SystemPolicyV1Beta1ClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockSystemPolicyV1Beta1 mockSystemPolicyV1Beta1; - private LocalChannelProvider channelProvider; - private SystemPolicyV1Beta1Client client; - - @BeforeClass - public static void startStaticServer() { - mockSystemPolicyV1Beta1 = new MockSystemPolicyV1Beta1(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockSystemPolicyV1Beta1)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - SystemPolicyV1Beta1Settings settings = - SystemPolicyV1Beta1Settings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SystemPolicyV1Beta1Client.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getSystemPolicyTest() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockSystemPolicyV1Beta1.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - - Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSystemPolicyV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSystemPolicyRequest actualRequest = ((GetSystemPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSystemPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSystemPolicyV1Beta1.addException(exception); - - try { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSystemPolicyTest2() throws Exception { - Policy expectedResponse = - Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules(new HashMap()) - .putAllIstioServiceIdentityAdmissionRules(new HashMap()) - .setDefaultAdmissionRule(AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockSystemPolicyV1Beta1.addResponse(expectedResponse); - - String name = "name3373707"; - - Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSystemPolicyV1Beta1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - GetSystemPolicyRequest actualRequest = ((GetSystemPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSystemPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSystemPolicyV1Beta1.addException(exception); - - try { - String name = "name3373707"; - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java deleted file mode 100644 index 6284517d..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientHttpJsonTest.java +++ /dev/null @@ -1,699 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.common.collect.Lists; -import com.google.protobuf.Empty; -import com.google.protobuf.Timestamp; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonBinauthzManagementServiceV1Stub; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -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 BinauthzManagementServiceV1ClientHttpJsonTest { - private static MockHttpService mockService; - private static BinauthzManagementServiceV1Client client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonBinauthzManagementServiceV1Stub.getMethodDescriptors(), - BinauthzManagementServiceV1Settings.getDefaultEndpoint()); - BinauthzManagementServiceV1Settings settings = - BinauthzManagementServiceV1Settings.newHttpJsonBuilder() - .setTransportChannelProvider( - BinauthzManagementServiceV1Settings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = BinauthzManagementServiceV1Client.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void getPolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - - Resources.Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getPolicyTest2() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-415/policy"; - - Resources.Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-415/policy"; - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updatePolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Resources.Policy policy = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - - Resources.Policy actualResponse = client.updatePolicy(policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updatePolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Resources.Policy policy = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns( - new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules( - new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - client.updatePolicy(policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - - Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest2() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - - Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void createAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - Resources.Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest2() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2729/attestors/attestor-2729"; - - Resources.Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2729/attestors/attestor-2729"; - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - Resources.Attestor attestor = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - - Resources.Attestor actualResponse = client.updateAttestor(attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void updateAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Resources.Attestor attestor = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - client.updateAttestor(attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest() throws Exception { - Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); - Service.ListAttestorsResponse expectedResponse = - Service.ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAttestorsExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest2() throws Exception { - Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); - Service.ListAttestorsResponse expectedResponse = - Service.ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String parent = "projects/project-2353"; - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void listAttestorsExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String parent = "projects/project-2353"; - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - client.deleteAttestor(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteAttestorExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockService.addResponse(expectedResponse); - - String name = "projects/project-2729/attestors/attestor-2729"; - - client.deleteAttestor(name); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void deleteAttestorExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "projects/project-2729/attestors/attestor-2729"; - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java deleted file mode 100644 index 83138a95..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1ClientTest.java +++ /dev/null @@ -1,605 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import static com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client.ListAttestorsPagedResponse; - -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.Empty; -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 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 BinauthzManagementServiceV1ClientTest { - private static MockBinauthzManagementServiceV1 mockBinauthzManagementServiceV1; - private static MockServiceHelper mockServiceHelper; - private LocalChannelProvider channelProvider; - private BinauthzManagementServiceV1Client client; - - @BeforeClass - public static void startStaticServer() { - mockBinauthzManagementServiceV1 = new MockBinauthzManagementServiceV1(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), - Arrays.asList(mockBinauthzManagementServiceV1)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - BinauthzManagementServiceV1Settings settings = - BinauthzManagementServiceV1Settings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = BinauthzManagementServiceV1Client.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getPolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - - Resources.Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetPolicyRequest actualRequest = ((Service.GetPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getPolicyTest2() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - String name = "name3373707"; - - Resources.Policy actualResponse = client.getPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetPolicyRequest actualRequest = ((Service.GetPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - String name = "name3373707"; - client.getPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updatePolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - Resources.Policy policy = Resources.Policy.newBuilder().build(); - - Resources.Policy actualResponse = client.updatePolicy(policy); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.UpdatePolicyRequest actualRequest = - ((Service.UpdatePolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(policy, actualRequest.getPolicy()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updatePolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - Resources.Policy policy = Resources.Policy.newBuilder().build(); - client.updatePolicy(policy); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - - Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.CreateAttestorRequest actualRequest = - ((Service.CreateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertEquals(attestorId, actualRequest.getAttestorId()); - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void createAttestorTest2() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - String parent = "parent-995424086"; - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - - Resources.Attestor actualResponse = client.createAttestor(parent, attestorId, attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.CreateAttestorRequest actualRequest = - ((Service.CreateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertEquals(attestorId, actualRequest.getAttestorId()); - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void createAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - String parent = "parent-995424086"; - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - client.createAttestor(parent, attestorId, attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - Resources.Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetAttestorRequest actualRequest = ((Service.GetAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getAttestorTest2() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - String name = "name3373707"; - - Resources.Attestor actualResponse = client.getAttestor(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetAttestorRequest actualRequest = ((Service.GetAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - String name = "name3373707"; - client.getAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void updateAttestorTest() throws Exception { - Resources.Attestor expectedResponse = - Resources.Attestor.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .setDescription("description-1724546052") - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - - Resources.Attestor actualResponse = client.updateAttestor(attestor); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.UpdateAttestorRequest actualRequest = - ((Service.UpdateAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(attestor, actualRequest.getAttestor()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void updateAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - client.updateAttestor(attestor); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest() throws Exception { - Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); - Service.ListAttestorsResponse expectedResponse = - Service.ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - ProjectName parent = ProjectName.of("[PROJECT]"); - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.ListAttestorsRequest actualRequest = - ((Service.ListAttestorsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent.toString(), actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAttestorsExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - ProjectName parent = ProjectName.of("[PROJECT]"); - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void listAttestorsTest2() throws Exception { - Resources.Attestor responsesElement = Resources.Attestor.newBuilder().build(); - Service.ListAttestorsResponse expectedResponse = - Service.ListAttestorsResponse.newBuilder() - .setNextPageToken("") - .addAllAttestors(Arrays.asList(responsesElement)) - .build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - String parent = "parent-995424086"; - - ListAttestorsPagedResponse pagedListResponse = client.listAttestors(parent); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getAttestorsList().get(0), resources.get(0)); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.ListAttestorsRequest actualRequest = - ((Service.ListAttestorsRequest) actualRequests.get(0)); - - Assert.assertEquals(parent, actualRequest.getParent()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listAttestorsExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - String parent = "parent-995424086"; - client.listAttestors(parent); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - - client.deleteAttestor(name); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.DeleteAttestorRequest actualRequest = - ((Service.DeleteAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAttestorExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void deleteAttestorTest2() throws Exception { - Empty expectedResponse = Empty.newBuilder().build(); - mockBinauthzManagementServiceV1.addResponse(expectedResponse); - - String name = "name3373707"; - - client.deleteAttestor(name); - - List actualRequests = mockBinauthzManagementServiceV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.DeleteAttestorRequest actualRequest = - ((Service.DeleteAttestorRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void deleteAttestorExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockBinauthzManagementServiceV1.addException(exception); - - try { - String name = "name3373707"; - client.deleteAttestor(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java deleted file mode 100644 index 794034b9..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockBinauthzManagementServiceV1 implements MockGrpcService { - private final MockBinauthzManagementServiceV1Impl serviceImpl; - - public MockBinauthzManagementServiceV1() { - serviceImpl = new MockBinauthzManagementServiceV1Impl(); - } - - @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java deleted file mode 100644 index 6814eaef..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockBinauthzManagementServiceV1Impl.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.protobuf.AbstractMessage; -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Grpc.BinauthzManagementServiceV1ImplBase; -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 MockBinauthzManagementServiceV1Impl extends BinauthzManagementServiceV1ImplBase { - private List requests; - private Queue responses; - - public MockBinauthzManagementServiceV1Impl() { - 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 getPolicy( - Service.GetPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Policy) { - requests.add(request); - responseObserver.onNext(((Resources.Policy) 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 GetPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updatePolicy( - Service.UpdatePolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Policy) { - requests.add(request); - responseObserver.onNext(((Resources.Policy) 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 UpdatePolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Policy.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void createAttestor( - Service.CreateAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Attestor) { - requests.add(request); - responseObserver.onNext(((Resources.Attestor) 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 CreateAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void getAttestor( - Service.GetAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Attestor) { - requests.add(request); - responseObserver.onNext(((Resources.Attestor) 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 GetAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void updateAttestor( - Service.UpdateAttestorRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Attestor) { - requests.add(request); - responseObserver.onNext(((Resources.Attestor) 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 UpdateAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Attestor.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void listAttestors( - Service.ListAttestorsRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Service.ListAttestorsResponse) { - requests.add(request); - responseObserver.onNext(((Service.ListAttestorsResponse) 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 ListAttestors, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Service.ListAttestorsResponse.class.getName(), - Exception.class.getName()))); - } - } - - @Override - public void deleteAttestor( - Service.DeleteAttestorRequest 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 DeleteAttestor, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Empty.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java deleted file mode 100644 index 6e496637..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockSystemPolicyV1 implements MockGrpcService { - private final MockSystemPolicyV1Impl serviceImpl; - - public MockSystemPolicyV1() { - serviceImpl = new MockSystemPolicyV1Impl(); - } - - @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java deleted file mode 100644 index cf558665..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockSystemPolicyV1Impl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.protobuf.AbstractMessage; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Grpc.SystemPolicyV1ImplBase; -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 MockSystemPolicyV1Impl extends SystemPolicyV1ImplBase { - private List requests; - private Queue responses; - - public MockSystemPolicyV1Impl() { - 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 getSystemPolicy( - Service.GetSystemPolicyRequest request, StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Resources.Policy) { - requests.add(request); - responseObserver.onNext(((Resources.Policy) 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 GetSystemPolicy, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Resources.Policy.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java deleted file mode 100644 index 0ccecad6..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.protobuf.AbstractMessage; -import io.grpc.ServerServiceDefinition; -import java.util.List; -import javax.annotation.Generated; - -@BetaApi -@Generated("by gapic-generator-java") -public class MockValidationHelperV1 implements MockGrpcService { - private final MockValidationHelperV1Impl serviceImpl; - - public MockValidationHelperV1() { - serviceImpl = new MockValidationHelperV1Impl(); - } - - @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-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java deleted file mode 100644 index 32817078..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/MockValidationHelperV1Impl.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.protobuf.AbstractMessage; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Grpc.ValidationHelperV1ImplBase; -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 MockValidationHelperV1Impl extends ValidationHelperV1ImplBase { - private List requests; - private Queue responses; - - public MockValidationHelperV1Impl() { - 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 validateAttestationOccurrence( - Service.ValidateAttestationOccurrenceRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof Service.ValidateAttestationOccurrenceResponse) { - requests.add(request); - responseObserver.onNext(((Service.ValidateAttestationOccurrenceResponse) 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 ValidateAttestationOccurrence, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - Service.ValidateAttestationOccurrenceResponse.class.getName(), - Exception.class.getName()))); - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java deleted file mode 100644 index da870efb..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientHttpJsonTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.protobuf.Timestamp; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonSystemPolicyV1Stub; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -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 SystemPolicyV1ClientHttpJsonTest { - private static MockHttpService mockService; - private static SystemPolicyV1Client client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonSystemPolicyV1Stub.getMethodDescriptors(), - SystemPolicyV1Settings.getDefaultEndpoint()); - SystemPolicyV1Settings settings = - SystemPolicyV1Settings.newHttpJsonBuilder() - .setTransportChannelProvider( - SystemPolicyV1Settings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SystemPolicyV1Client.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void getSystemPolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - - Resources.Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSystemPolicyExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSystemPolicyTest2() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockService.addResponse(expectedResponse); - - String name = "locations/location-9731/policy"; - - Resources.Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void getSystemPolicyExceptionTest2() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String name = "locations/location-9731/policy"; - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java deleted file mode 100644 index 4be86f68..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1ClientTest.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.protobuf.AbstractMessage; -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 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 SystemPolicyV1ClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockSystemPolicyV1 mockSystemPolicyV1; - private LocalChannelProvider channelProvider; - private SystemPolicyV1Client client; - - @BeforeClass - public static void startStaticServer() { - mockSystemPolicyV1 = new MockSystemPolicyV1(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockSystemPolicyV1)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - SystemPolicyV1Settings settings = - SystemPolicyV1Settings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = SystemPolicyV1Client.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void getSystemPolicyTest() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockSystemPolicyV1.addResponse(expectedResponse); - - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - - Resources.Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSystemPolicyV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetSystemPolicyRequest actualRequest = - ((Service.GetSystemPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name.toString(), actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSystemPolicyExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSystemPolicyV1.addException(exception); - - try { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } - - @Test - public void getSystemPolicyTest2() throws Exception { - Resources.Policy expectedResponse = - Resources.Policy.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .setDescription("description-1724546052") - .addAllAdmissionWhitelistPatterns(new ArrayList()) - .putAllClusterAdmissionRules(new HashMap()) - .putAllKubernetesNamespaceAdmissionRules(new HashMap()) - .putAllKubernetesServiceAccountAdmissionRules( - new HashMap()) - .putAllIstioServiceIdentityAdmissionRules( - new HashMap()) - .setDefaultAdmissionRule(Resources.AdmissionRule.newBuilder().build()) - .setUpdateTime(Timestamp.newBuilder().build()) - .build(); - mockSystemPolicyV1.addResponse(expectedResponse); - - String name = "name3373707"; - - Resources.Policy actualResponse = client.getSystemPolicy(name); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockSystemPolicyV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.GetSystemPolicyRequest actualRequest = - ((Service.GetSystemPolicyRequest) actualRequests.get(0)); - - Assert.assertEquals(name, actualRequest.getName()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void getSystemPolicyExceptionTest2() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockSystemPolicyV1.addException(exception); - - try { - String name = "name3373707"; - client.getSystemPolicy(name); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java deleted file mode 100644 index 52258265..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientHttpJsonTest.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.httpjson.GaxHttpJsonProperties; -import com.google.api.gax.httpjson.testing.MockHttpService; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.ApiException; -import com.google.api.gax.rpc.ApiExceptionFactory; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.api.gax.rpc.StatusCode; -import com.google.api.gax.rpc.testing.FakeStatusCode; -import com.google.protos.google.cloud.binaryauthorization.v1.stub.HttpJsonValidationHelperV1Stub; -import io.grafeas.v1.AttestationOccurrence; -import java.io.IOException; -import java.util.List; -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 ValidationHelperV1ClientHttpJsonTest { - private static MockHttpService mockService; - private static ValidationHelperV1Client client; - - @BeforeClass - public static void startStaticServer() throws IOException { - mockService = - new MockHttpService( - HttpJsonValidationHelperV1Stub.getMethodDescriptors(), - ValidationHelperV1Settings.getDefaultEndpoint()); - ValidationHelperV1Settings settings = - ValidationHelperV1Settings.newHttpJsonBuilder() - .setTransportChannelProvider( - ValidationHelperV1Settings.defaultHttpJsonTransportProviderBuilder() - .setHttpTransport(mockService) - .build()) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ValidationHelperV1Client.create(settings); - } - - @AfterClass - public static void stopServer() { - client.close(); - } - - @Before - public void setUp() {} - - @After - public void tearDown() throws Exception { - mockService.reset(); - } - - @Test - public void validateAttestationOccurrenceTest() throws Exception { - Service.ValidateAttestationOccurrenceResponse expectedResponse = - Service.ValidateAttestationOccurrenceResponse.newBuilder() - .setDenialReason("denialReason-966999989") - .build(); - mockService.addResponse(expectedResponse); - - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("projects/project-380/attestors/attestor-380") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - - Service.ValidateAttestationOccurrenceResponse actualResponse = - client.validateAttestationOccurrence(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockService.getRequestPaths(); - Assert.assertEquals(1, actualRequests.size()); - - String apiClientHeaderKey = - mockService - .getRequestHeaders() - .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey()) - .iterator() - .next(); - Assert.assertTrue( - GaxHttpJsonProperties.getDefaultApiClientHeaderPattern() - .matcher(apiClientHeaderKey) - .matches()); - } - - @Test - public void validateAttestationOccurrenceExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("projects/project-380/attestors/attestor-380") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - client.validateAttestationOccurrence(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java b/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java deleted file mode 100644 index d9254fdf..00000000 --- a/google-cloud-binary-authorization/src/test/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1ClientTest.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.gax.core.NoCredentialsProvider; -import com.google.api.gax.grpc.GaxGrpcProperties; -import com.google.api.gax.grpc.testing.LocalChannelProvider; -import com.google.api.gax.grpc.testing.MockGrpcService; -import com.google.api.gax.grpc.testing.MockServiceHelper; -import com.google.api.gax.rpc.ApiClientHeaderProvider; -import com.google.api.gax.rpc.InvalidArgumentException; -import com.google.protobuf.AbstractMessage; -import io.grafeas.v1.AttestationOccurrence; -import io.grpc.StatusRuntimeException; -import java.io.IOException; -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 ValidationHelperV1ClientTest { - private static MockServiceHelper mockServiceHelper; - private static MockValidationHelperV1 mockValidationHelperV1; - private LocalChannelProvider channelProvider; - private ValidationHelperV1Client client; - - @BeforeClass - public static void startStaticServer() { - mockValidationHelperV1 = new MockValidationHelperV1(); - mockServiceHelper = - new MockServiceHelper( - UUID.randomUUID().toString(), Arrays.asList(mockValidationHelperV1)); - mockServiceHelper.start(); - } - - @AfterClass - public static void stopServer() { - mockServiceHelper.stop(); - } - - @Before - public void setUp() throws IOException { - mockServiceHelper.reset(); - channelProvider = mockServiceHelper.createChannelProvider(); - ValidationHelperV1Settings settings = - ValidationHelperV1Settings.newBuilder() - .setTransportChannelProvider(channelProvider) - .setCredentialsProvider(NoCredentialsProvider.create()) - .build(); - client = ValidationHelperV1Client.create(settings); - } - - @After - public void tearDown() throws Exception { - client.close(); - } - - @Test - public void validateAttestationOccurrenceTest() throws Exception { - Service.ValidateAttestationOccurrenceResponse expectedResponse = - Service.ValidateAttestationOccurrenceResponse.newBuilder() - .setDenialReason("denialReason-966999989") - .build(); - mockValidationHelperV1.addResponse(expectedResponse); - - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("attestor542920680") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - - Service.ValidateAttestationOccurrenceResponse actualResponse = - client.validateAttestationOccurrence(request); - Assert.assertEquals(expectedResponse, actualResponse); - - List actualRequests = mockValidationHelperV1.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - Service.ValidateAttestationOccurrenceRequest actualRequest = - ((Service.ValidateAttestationOccurrenceRequest) actualRequests.get(0)); - - Assert.assertEquals(request.getAttestor(), actualRequest.getAttestor()); - Assert.assertEquals(request.getAttestation(), actualRequest.getAttestation()); - Assert.assertEquals(request.getOccurrenceNote(), actualRequest.getOccurrenceNote()); - Assert.assertEquals( - request.getOccurrenceResourceUri(), actualRequest.getOccurrenceResourceUri()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void validateAttestationOccurrenceExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockValidationHelperV1.addException(exception); - - try { - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("attestor542920680") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - client.validateAttestationOccurrence(request); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } -} diff --git a/grpc-google-cloud-binary-authorization-v1/pom.xml b/grpc-google-cloud-binary-authorization-v1/pom.xml deleted file mode 100644 index 4ca8b2a2..00000000 --- a/grpc-google-cloud-binary-authorization-v1/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - grpc-google-cloud-binary-authorization-v1 - GRPC library for google-cloud-binary-authorization - - com.google.cloud - google-cloud-binary-authorization-parent - 1.2.9-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1 - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java deleted file mode 100644 index 9d1b55fd..00000000 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/BinauthzManagementServiceV1Grpc.java +++ /dev/null @@ -1,1246 +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.protos.google.cloud.binaryauthorization.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Google Cloud Management Service for Binary Authorization admission policies
- * and attestation authorities.
- * This API implements a REST model with the following objects:
- * * [Policy][google.cloud.binaryauthorization.v1.Policy]
- * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/binaryauthorization/v1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BinauthzManagementServiceV1Grpc { - - private BinauthzManagementServiceV1Grpc() {} - - public static final String SERVICE_NAME = - "google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicy", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetPolicyMethod; - if ((getGetPolicyMethod = BinauthzManagementServiceV1Grpc.getGetPolicyMethod) == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getGetPolicyMethod = BinauthzManagementServiceV1Grpc.getGetPolicyMethod) == null) { - BinauthzManagementServiceV1Grpc.getGetPolicyMethod = - getGetPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("GetPolicy")) - .build(); - } - } - } - return getGetPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getUpdatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest.class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getUpdatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getUpdatePolicyMethod; - if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod) == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod) - == null) { - BinauthzManagementServiceV1Grpc.getUpdatePolicyMethod = - getUpdatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdatePolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("UpdatePolicy")) - .build(); - } - } - } - return getUpdatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getCreateAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAttestor", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest.class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getCreateAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getCreateAttestorMethod; - if ((getCreateAttestorMethod = BinauthzManagementServiceV1Grpc.getCreateAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getCreateAttestorMethod = BinauthzManagementServiceV1Grpc.getCreateAttestorMethod) - == null) { - BinauthzManagementServiceV1Grpc.getCreateAttestorMethod = - getCreateAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .Attestor.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("CreateAttestor")) - .build(); - } - } - } - return getCreateAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getGetAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAttestor", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest.class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getGetAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getGetAttestorMethod; - if ((getGetAttestorMethod = BinauthzManagementServiceV1Grpc.getGetAttestorMethod) == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getGetAttestorMethod = BinauthzManagementServiceV1Grpc.getGetAttestorMethod) == null) { - BinauthzManagementServiceV1Grpc.getGetAttestorMethod = - getGetAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetAttestorRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .Attestor.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("GetAttestor")) - .build(); - } - } - } - return getGetAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getUpdateAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAttestor", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest.class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getUpdateAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getUpdateAttestorMethod; - if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod) - == null) { - BinauthzManagementServiceV1Grpc.getUpdateAttestorMethod = - getUpdateAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .Attestor.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("UpdateAttestor")) - .build(); - } - } - } - return getUpdateAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - getListAttestorsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAttestors", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest.class, - responseType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - getListAttestorsMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - getListAttestorsMethod; - if ((getListAttestorsMethod = BinauthzManagementServiceV1Grpc.getListAttestorsMethod) == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getListAttestorsMethod = BinauthzManagementServiceV1Grpc.getListAttestorsMethod) - == null) { - BinauthzManagementServiceV1Grpc.getListAttestorsMethod = - getListAttestorsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttestors")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("ListAttestors")) - .build(); - } - } - } - return getListAttestorsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAttestor", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod; - if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Grpc.class) { - if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod) - == null) { - BinauthzManagementServiceV1Grpc.getDeleteAttestorMethod = - getDeleteAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1MethodDescriptorSupplier("DeleteAttestor")) - .build(); - } - } - } - return getDeleteAttestorMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static BinauthzManagementServiceV1Stub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Stub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static BinauthzManagementServiceV1BlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1BlockingStub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1BlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static BinauthzManagementServiceV1FutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1FutureStub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1FutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
-   * 
- */ - public abstract static class BinauthzManagementServiceV1ImplBase - implements io.grpc.BindableService { - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
-     * 
- */ - public void getPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public void updatePolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
-     * 
- */ - public void createAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void getAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void updateAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public void listAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAttestorsMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void deleteAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAttestorMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( - this, METHODID_GET_POLICY))) - .addMethod( - getUpdatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdatePolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( - this, METHODID_UPDATE_POLICY))) - .addMethod( - getCreateAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( - this, METHODID_CREATE_ATTESTOR))) - .addMethod( - getGetAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( - this, METHODID_GET_ATTESTOR))) - .addMethod( - getUpdateAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( - this, METHODID_UPDATE_ATTESTOR))) - .addMethod( - getListAttestorsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse>(this, METHODID_LIST_ATTESTORS))) - .addMethod( - getDeleteAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_ATTESTOR))) - .build(); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1Stub - extends io.grpc.stub.AbstractAsyncStub { - private BinauthzManagementServiceV1Stub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Stub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
-     * 
- */ - public void getPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public void updatePolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
-     * 
- */ - public void createAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void getAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void updateAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public void listAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAttestorsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public void deleteAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private BinauthzManagementServiceV1BlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1BlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1BlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy updatePolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor createAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor updateAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - listAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAttestorsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.protobuf.Empty deleteAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAttestorMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1FutureStub - extends io.grpc.stub.AbstractFutureStub { - private BinauthzManagementServiceV1FutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1FutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1FutureStub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - updatePolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - createAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - updateAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse> - listAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAttestorsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_POLICY = 0; - private static final int METHODID_UPDATE_POLICY = 1; - private static final int METHODID_CREATE_ATTESTOR = 2; - private static final int METHODID_GET_ATTESTOR = 3; - private static final int METHODID_UPDATE_ATTESTOR = 4; - private static final int METHODID_LIST_ATTESTORS = 5; - private static final int METHODID_DELETE_ATTESTOR = 6; - - 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 BinauthzManagementServiceV1ImplBase serviceImpl; - private final int methodId; - - MethodHandlers(BinauthzManagementServiceV1ImplBase 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_GET_POLICY: - serviceImpl.getPolicy( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) - responseObserver); - break; - case METHODID_UPDATE_POLICY: - serviceImpl.updatePolicy( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) - responseObserver); - break; - case METHODID_CREATE_ATTESTOR: - serviceImpl.createAttestor( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) - responseObserver); - break; - case METHODID_GET_ATTESTOR: - serviceImpl.getAttestor( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) - responseObserver); - break; - case METHODID_UPDATE_ATTESTOR: - serviceImpl.updateAttestor( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>) - responseObserver); - break; - case METHODID_LIST_ATTESTORS: - serviceImpl.listAttestors( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse>) - responseObserver); - break; - case METHODID_DELETE_ATTESTOR: - serviceImpl.deleteAttestor( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) - request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class BinauthzManagementServiceV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - BinauthzManagementServiceV1BaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("BinauthzManagementServiceV1"); - } - } - - private static final class BinauthzManagementServiceV1FileDescriptorSupplier - extends BinauthzManagementServiceV1BaseDescriptorSupplier { - BinauthzManagementServiceV1FileDescriptorSupplier() {} - } - - private static final class BinauthzManagementServiceV1MethodDescriptorSupplier - extends BinauthzManagementServiceV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - BinauthzManagementServiceV1MethodDescriptorSupplier(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 (BinauthzManagementServiceV1Grpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new BinauthzManagementServiceV1FileDescriptorSupplier()) - .addMethod(getGetPolicyMethod()) - .addMethod(getUpdatePolicyMethod()) - .addMethod(getCreateAttestorMethod()) - .addMethod(getGetAttestorMethod()) - .addMethod(getUpdateAttestorMethod()) - .addMethod(getListAttestorsMethod()) - .addMethod(getDeleteAttestorMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java deleted file mode 100644 index d43a1905..00000000 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/SystemPolicyV1Grpc.java +++ /dev/null @@ -1,376 +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.protos.google.cloud.binaryauthorization.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * API for working with the system policy.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/binaryauthorization/v1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class SystemPolicyV1Grpc { - - private SystemPolicyV1Grpc() {} - - public static final String SERVICE_NAME = "google.cloud.binaryauthorization.v1.SystemPolicyV1"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetSystemPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSystemPolicy", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .class, - responseType = com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetSystemPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getGetSystemPolicyMethod; - if ((getGetSystemPolicyMethod = SystemPolicyV1Grpc.getGetSystemPolicyMethod) == null) { - synchronized (SystemPolicyV1Grpc.class) { - if ((getGetSystemPolicyMethod = SystemPolicyV1Grpc.getGetSystemPolicyMethod) == null) { - SystemPolicyV1Grpc.getGetSystemPolicyMethod = - getGetSystemPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSystemPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new SystemPolicyV1MethodDescriptorSupplier("GetSystemPolicy")) - .build(); - } - } - } - return getGetSystemPolicyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static SystemPolicyV1Stub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Stub(channel, callOptions); - } - }; - return SystemPolicyV1Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SystemPolicyV1BlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1BlockingStub(channel, callOptions); - } - }; - return SystemPolicyV1BlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static SystemPolicyV1FutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1FutureStub(channel, callOptions); - } - }; - return SystemPolicyV1FutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public abstract static class SystemPolicyV1ImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public void getSystemPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetSystemPolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetSystemPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>( - this, METHODID_GET_SYSTEM_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1Stub - extends io.grpc.stub.AbstractAsyncStub { - private SystemPolicyV1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1Stub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Stub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public void getSystemPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private SystemPolicyV1BlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1BlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1BlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getSystemPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSystemPolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1FutureStub - extends io.grpc.stub.AbstractFutureStub { - private SystemPolicyV1FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1FutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1FutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy> - getSystemPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_SYSTEM_POLICY = 0; - - 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 SystemPolicyV1ImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SystemPolicyV1ImplBase 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_GET_SYSTEM_POLICY: - serviceImpl.getSystemPolicy( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy>) - 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 SystemPolicyV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SystemPolicyV1BaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SystemPolicyV1"); - } - } - - private static final class SystemPolicyV1FileDescriptorSupplier - extends SystemPolicyV1BaseDescriptorSupplier { - SystemPolicyV1FileDescriptorSupplier() {} - } - - private static final class SystemPolicyV1MethodDescriptorSupplier - extends SystemPolicyV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SystemPolicyV1MethodDescriptorSupplier(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 (SystemPolicyV1Grpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SystemPolicyV1FileDescriptorSupplier()) - .addMethod(getGetSystemPolicyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java b/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java deleted file mode 100644 index a20a6069..00000000 --- a/grpc-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ValidationHelperV1Grpc.java +++ /dev/null @@ -1,411 +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.protos.google.cloud.binaryauthorization.v1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * BinAuthz Attestor verification
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/binaryauthorization/v1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class ValidationHelperV1Grpc { - - private ValidationHelperV1Grpc() {} - - public static final String SERVICE_NAME = - "google.cloud.binaryauthorization.v1.ValidationHelperV1"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - getValidateAttestationOccurrenceMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ValidateAttestationOccurrence", - requestType = - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.class, - responseType = - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - getValidateAttestationOccurrenceMethod() { - io.grpc.MethodDescriptor< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - getValidateAttestationOccurrenceMethod; - if ((getValidateAttestationOccurrenceMethod = - ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod) - == null) { - synchronized (ValidationHelperV1Grpc.class) { - if ((getValidateAttestationOccurrenceMethod = - ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod) - == null) { - ValidationHelperV1Grpc.getValidateAttestationOccurrenceMethod = - getValidateAttestationOccurrenceMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ValidateAttestationOccurrence")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.getDefaultInstance())) - .setSchemaDescriptor( - new ValidationHelperV1MethodDescriptorSupplier( - "ValidateAttestationOccurrence")) - .build(); - } - } - } - return getValidateAttestationOccurrenceMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static ValidationHelperV1Stub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ValidationHelperV1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1Stub(channel, callOptions); - } - }; - return ValidationHelperV1Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static ValidationHelperV1BlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ValidationHelperV1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1BlockingStub(channel, callOptions); - } - }; - return ValidationHelperV1BlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static ValidationHelperV1FutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public ValidationHelperV1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1FutureStub(channel, callOptions); - } - }; - return ValidationHelperV1FutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * BinAuthz Attestor verification
-   * 
- */ - public abstract static class ValidationHelperV1ImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Returns whether the given Attestation for the given image URI
-     * was signed by the given Attestor
-     * 
- */ - public void validateAttestationOccurrence( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getValidateAttestationOccurrenceMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getValidateAttestationOccurrenceMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse>( - this, METHODID_VALIDATE_ATTESTATION_OCCURRENCE))) - .build(); - } - } - - /** - * - * - *
-   * BinAuthz Attestor verification
-   * 
- */ - public static final class ValidationHelperV1Stub - extends io.grpc.stub.AbstractAsyncStub { - private ValidationHelperV1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ValidationHelperV1Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1Stub(channel, callOptions); - } - - /** - * - * - *
-     * Returns whether the given Attestation for the given image URI
-     * was signed by the given Attestor
-     * 
- */ - public void validateAttestationOccurrence( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - request, - io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getValidateAttestationOccurrenceMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * BinAuthz Attestor verification
-   * 
- */ - public static final class ValidationHelperV1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private ValidationHelperV1BlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ValidationHelperV1BlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1BlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns whether the given Attestation for the given image URI
-     * was signed by the given Attestor
-     * 
- */ - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - validateAttestationOccurrence( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getValidateAttestationOccurrenceMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * BinAuthz Attestor verification
-   * 
- */ - public static final class ValidationHelperV1FutureStub - extends io.grpc.stub.AbstractFutureStub { - private ValidationHelperV1FutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected ValidationHelperV1FutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new ValidationHelperV1FutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Returns whether the given Attestation for the given image URI
-     * was signed by the given Attestor
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse> - validateAttestationOccurrence( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getValidateAttestationOccurrenceMethod(), getCallOptions()), - request); - } - } - - private static final int METHODID_VALIDATE_ATTESTATION_OCCURRENCE = 0; - - 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 ValidationHelperV1ImplBase serviceImpl; - private final int methodId; - - MethodHandlers(ValidationHelperV1ImplBase 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_VALIDATE_ATTESTATION_OCCURRENCE: - serviceImpl.validateAttestationOccurrence( - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest) - request, - (io.grpc.stub.StreamObserver< - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse>) - 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 ValidationHelperV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - ValidationHelperV1BaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("ValidationHelperV1"); - } - } - - private static final class ValidationHelperV1FileDescriptorSupplier - extends ValidationHelperV1BaseDescriptorSupplier { - ValidationHelperV1FileDescriptorSupplier() {} - } - - private static final class ValidationHelperV1MethodDescriptorSupplier - extends ValidationHelperV1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - ValidationHelperV1MethodDescriptorSupplier(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 (ValidationHelperV1Grpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new ValidationHelperV1FileDescriptorSupplier()) - .addMethod(getValidateAttestationOccurrenceMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml b/grpc-google-cloud-binary-authorization-v1beta1/pom.xml deleted file mode 100644 index b7ad77b1..00000000 --- a/grpc-google-cloud-binary-authorization-v1beta1/pom.xml +++ /dev/null @@ -1,65 +0,0 @@ - - 4.0.0 - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - grpc-google-cloud-binary-authorization-v1beta1 - GRPC library for google-cloud-binary-authorization - - com.google.cloud - google-cloud-binary-authorization-parent - 1.2.9-SNAPSHOT - - - - io.grpc - grpc-api - - - io.grpc - grpc-stub - - - io.grpc - grpc-protobuf - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1beta1 - - - com.google.guava - guava - - - - - - java9 - - [9,) - - - - javax.annotation - javax.annotation-api - - - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - \ No newline at end of file diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java deleted file mode 100644 index 2ba1ef37..00000000 --- a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinauthzManagementServiceV1Beta1Grpc.java +++ /dev/null @@ -1,1195 +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.binaryauthorization.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * Google Cloud Management Service for Binary Authorization admission policies
- * and attestation authorities.
- * This API implements a REST model with the following objects:
- * * [Policy][google.cloud.binaryauthorization.v1beta1.Policy]
- * * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class BinauthzManagementServiceV1Beta1Grpc { - - private BinauthzManagementServiceV1Beta1Grpc() {} - - public static final String SERVICE_NAME = - "google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetPolicy", - requestType = com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetPolicyMethod; - if ((getGetPolicyMethod = BinauthzManagementServiceV1Beta1Grpc.getGetPolicyMethod) == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getGetPolicyMethod = BinauthzManagementServiceV1Beta1Grpc.getGetPolicyMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getGetPolicyMethod = - getGetPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier("GetPolicy")) - .build(); - } - } - } - return getGetPolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getUpdatePolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdatePolicy", - requestType = com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getUpdatePolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getUpdatePolicyMethod; - if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Beta1Grpc.getUpdatePolicyMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getUpdatePolicyMethod = BinauthzManagementServiceV1Beta1Grpc.getUpdatePolicyMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getUpdatePolicyMethod = - getUpdatePolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdatePolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "UpdatePolicy")) - .build(); - } - } - } - return getUpdatePolicyMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getCreateAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "CreateAttestor", - requestType = com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getCreateAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getCreateAttestorMethod; - if ((getCreateAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getCreateAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getCreateAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getCreateAttestorMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getCreateAttestorMethod = - getCreateAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Attestor - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "CreateAttestor")) - .build(); - } - } - } - return getCreateAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getGetAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetAttestor", - requestType = com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getGetAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getGetAttestorMethod; - if ((getGetAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getGetAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getGetAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getGetAttestorMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getGetAttestorMethod = - getGetAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Attestor - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "GetAttestor")) - .build(); - } - } - } - return getGetAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getUpdateAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "UpdateAttestor", - requestType = com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Attestor.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getUpdateAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getUpdateAttestorMethod; - if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getUpdateAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getUpdateAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getUpdateAttestorMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getUpdateAttestorMethod = - getUpdateAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Attestor - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "UpdateAttestor")) - .build(); - } - } - } - return getUpdateAttestorMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - getListAttestorsMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListAttestors", - requestType = com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - getListAttestorsMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - getListAttestorsMethod; - if ((getListAttestorsMethod = BinauthzManagementServiceV1Beta1Grpc.getListAttestorsMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getListAttestorsMethod = BinauthzManagementServiceV1Beta1Grpc.getListAttestorsMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getListAttestorsMethod = - getListAttestorsMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListAttestors")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "ListAttestors")) - .build(); - } - } - } - return getListAttestorsMethod; - } - - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "DeleteAttestor", - requestType = com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.class, - responseType = com.google.protobuf.Empty.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest, - com.google.protobuf.Empty> - getDeleteAttestorMethod; - if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getDeleteAttestorMethod) - == null) { - synchronized (BinauthzManagementServiceV1Beta1Grpc.class) { - if ((getDeleteAttestorMethod = BinauthzManagementServiceV1Beta1Grpc.getDeleteAttestorMethod) - == null) { - BinauthzManagementServiceV1Beta1Grpc.getDeleteAttestorMethod = - getDeleteAttestorMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteAttestor")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.protobuf.Empty.getDefaultInstance())) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1MethodDescriptorSupplier( - "DeleteAttestor")) - .build(); - } - } - } - return getDeleteAttestorMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static BinauthzManagementServiceV1Beta1Stub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1Beta1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1Stub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1Beta1Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static BinauthzManagementServiceV1Beta1BlockingStub newBlockingStub( - io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1Beta1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1BlockingStub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1Beta1BlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static BinauthzManagementServiceV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public BinauthzManagementServiceV1Beta1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1FutureStub(channel, callOptions); - } - }; - return BinauthzManagementServiceV1Beta1FutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1beta1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
-   * 
- */ - public abstract static class BinauthzManagementServiceV1Beta1ImplBase - implements io.grpc.BindableService { - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
-     * 
- */ - public void getPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetPolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public void updatePolicy( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdatePolicyMethod(), responseObserver); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
-     * 
- */ - public void createAttestor( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getCreateAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void getAttestor( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void updateAttestor( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getUpdateAttestorMethod(), responseObserver); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public void listAttestors( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListAttestorsMethod(), responseObserver); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void deleteAttestor( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getDeleteAttestorMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy>( - this, METHODID_GET_POLICY))) - .addMethod( - getUpdatePolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy>( - this, METHODID_UPDATE_POLICY))) - .addMethod( - getCreateAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor>( - this, METHODID_CREATE_ATTESTOR))) - .addMethod( - getGetAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor>( - this, METHODID_GET_ATTESTOR))) - .addMethod( - getUpdateAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest, - com.google.cloud.binaryauthorization.v1beta1.Attestor>( - this, METHODID_UPDATE_ATTESTOR))) - .addMethod( - getListAttestorsMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse>( - this, METHODID_LIST_ATTESTORS))) - .addMethod( - getDeleteAttestorMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest, - com.google.protobuf.Empty>(this, METHODID_DELETE_ATTESTOR))) - .build(); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1beta1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1Beta1Stub - extends io.grpc.stub.AbstractAsyncStub { - private BinauthzManagementServiceV1Beta1Stub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1Beta1Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1Stub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
-     * 
- */ - public void getPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request, responseObserver); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public void updatePolicy( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
-     * 
- */ - public void createAttestor( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void getAttestor( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void updateAttestor( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public void listAttestors( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest request, - io.grpc.stub.StreamObserver< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListAttestorsMethod(), getCallOptions()), - request, - responseObserver); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public void deleteAttestor( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest request, - io.grpc.stub.StreamObserver responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1beta1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1Beta1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private BinauthzManagementServiceV1Beta1BlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1Beta1BlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1BlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetPolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Policy updatePolicy( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdatePolicyMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor createAttestor( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getCreateAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor updateAttestor( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getUpdateAttestorMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse listAttestors( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListAttestorsMethod(), getCallOptions(), request); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.protobuf.Empty deleteAttestor( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getDeleteAttestorMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * Google Cloud Management Service for Binary Authorization admission policies
-   * and attestation authorities.
-   * This API implements a REST model with the following objects:
-   * * [Policy][google.cloud.binaryauthorization.v1beta1.Policy]
-   * * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor]
-   * 
- */ - public static final class BinauthzManagementServiceV1Beta1FutureStub - extends io.grpc.stub.AbstractFutureStub { - private BinauthzManagementServiceV1Beta1FutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected BinauthzManagementServiceV1Beta1FutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new BinauthzManagementServiceV1Beta1FutureStub(channel, callOptions); - } - - /** - * - * - *
-     * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to
-     * a container image, before the project is allowed to deploy that
-     * image. There is at most one policy per project. All image admission
-     * requests are permitted if a project has no policy.
-     * Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default
-     * [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Policy> - getPolicy(com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetPolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the
-     * new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race
-     * conditions with concurrent policy enforcement (or management!)
-     * requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT
-     * if the request is malformed.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Policy> - updatePolicy(com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdatePolicyMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist,
-     * INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Attestor> - createAttestor(com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getCreateAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Attestor> - getAttestor(com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Attestor> - updateAttestor(com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getUpdateAttestorMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * Returns INVALID_ARGUMENT if the project does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse> - listAttestors(com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListAttestorsMethod(), getCallOptions()), request); - } - - /** - * - * - *
-     * Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the
-     * [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture - deleteAttestor(com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getDeleteAttestorMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_POLICY = 0; - private static final int METHODID_UPDATE_POLICY = 1; - private static final int METHODID_CREATE_ATTESTOR = 2; - private static final int METHODID_GET_ATTESTOR = 3; - private static final int METHODID_UPDATE_ATTESTOR = 4; - private static final int METHODID_LIST_ATTESTORS = 5; - private static final int METHODID_DELETE_ATTESTOR = 6; - - 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 BinauthzManagementServiceV1Beta1ImplBase serviceImpl; - private final int methodId; - - MethodHandlers(BinauthzManagementServiceV1Beta1ImplBase 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_GET_POLICY: - serviceImpl.getPolicy( - (com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_POLICY: - serviceImpl.updatePolicy( - (com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_CREATE_ATTESTOR: - serviceImpl.createAttestor( - (com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_GET_ATTESTOR: - serviceImpl.getAttestor( - (com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_UPDATE_ATTESTOR: - serviceImpl.updateAttestor( - (com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - case METHODID_LIST_ATTESTORS: - serviceImpl.listAttestors( - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) request, - (io.grpc.stub.StreamObserver< - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse>) - responseObserver); - break; - case METHODID_DELETE_ATTESTOR: - serviceImpl.deleteAttestor( - (com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) request, - (io.grpc.stub.StreamObserver) responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class BinauthzManagementServiceV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - BinauthzManagementServiceV1Beta1BaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("BinauthzManagementServiceV1Beta1"); - } - } - - private static final class BinauthzManagementServiceV1Beta1FileDescriptorSupplier - extends BinauthzManagementServiceV1Beta1BaseDescriptorSupplier { - BinauthzManagementServiceV1Beta1FileDescriptorSupplier() {} - } - - private static final class BinauthzManagementServiceV1Beta1MethodDescriptorSupplier - extends BinauthzManagementServiceV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - BinauthzManagementServiceV1Beta1MethodDescriptorSupplier(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 (BinauthzManagementServiceV1Beta1Grpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor( - new BinauthzManagementServiceV1Beta1FileDescriptorSupplier()) - .addMethod(getGetPolicyMethod()) - .addMethod(getUpdatePolicyMethod()) - .addMethod(getCreateAttestorMethod()) - .addMethod(getGetAttestorMethod()) - .addMethod(getUpdateAttestorMethod()) - .addMethod(getListAttestorsMethod()) - .addMethod(getDeleteAttestorMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java b/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java deleted file mode 100644 index 3ae0b37b..00000000 --- a/grpc-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/SystemPolicyV1Beta1Grpc.java +++ /dev/null @@ -1,369 +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.binaryauthorization.v1beta1; - -import static io.grpc.MethodDescriptor.generateFullMethodName; - -/** - * - * - *
- * API for working with the system policy.
- * 
- */ -@javax.annotation.Generated( - value = "by gRPC proto compiler", - comments = "Source: google/cloud/binaryauthorization/v1beta1/service.proto") -@io.grpc.stub.annotations.GrpcGenerated -public final class SystemPolicyV1Beta1Grpc { - - private SystemPolicyV1Beta1Grpc() {} - - public static final String SERVICE_NAME = - "google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1"; - - // Static method descriptors that strictly reflect the proto. - private static volatile io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetSystemPolicyMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "GetSystemPolicy", - requestType = com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, - responseType = com.google.cloud.binaryauthorization.v1beta1.Policy.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetSystemPolicyMethod() { - io.grpc.MethodDescriptor< - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy> - getGetSystemPolicyMethod; - if ((getGetSystemPolicyMethod = SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod) == null) { - synchronized (SystemPolicyV1Beta1Grpc.class) { - if ((getGetSystemPolicyMethod = SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod) == null) { - SystemPolicyV1Beta1Grpc.getGetSystemPolicyMethod = - getGetSystemPolicyMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetSystemPolicy")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - .getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.cloud.binaryauthorization.v1beta1.Policy - .getDefaultInstance())) - .setSchemaDescriptor( - new SystemPolicyV1Beta1MethodDescriptorSupplier("GetSystemPolicy")) - .build(); - } - } - } - return getGetSystemPolicyMethod; - } - - /** Creates a new async stub that supports all call types for the service */ - public static SystemPolicyV1Beta1Stub newStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1Beta1Stub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1Stub(channel, callOptions); - } - }; - return SystemPolicyV1Beta1Stub.newStub(factory, channel); - } - - /** - * Creates a new blocking-style stub that supports unary and streaming output calls on the service - */ - public static SystemPolicyV1Beta1BlockingStub newBlockingStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1Beta1BlockingStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1BlockingStub(channel, callOptions); - } - }; - return SystemPolicyV1Beta1BlockingStub.newStub(factory, channel); - } - - /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ - public static SystemPolicyV1Beta1FutureStub newFutureStub(io.grpc.Channel channel) { - io.grpc.stub.AbstractStub.StubFactory factory = - new io.grpc.stub.AbstractStub.StubFactory() { - @java.lang.Override - public SystemPolicyV1Beta1FutureStub newStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1FutureStub(channel, callOptions); - } - }; - return SystemPolicyV1Beta1FutureStub.newStub(factory, channel); - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public abstract static class SystemPolicyV1Beta1ImplBase implements io.grpc.BindableService { - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public void getSystemPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getGetSystemPolicyMethod(), responseObserver); - } - - @java.lang.Override - public final io.grpc.ServerServiceDefinition bindService() { - return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) - .addMethod( - getGetSystemPolicyMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest, - com.google.cloud.binaryauthorization.v1beta1.Policy>( - this, METHODID_GET_SYSTEM_POLICY))) - .build(); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1Beta1Stub - extends io.grpc.stub.AbstractAsyncStub { - private SystemPolicyV1Beta1Stub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1Beta1Stub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1Stub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public void getSystemPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), - request, - responseObserver); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1Beta1BlockingStub - extends io.grpc.stub.AbstractBlockingStub { - private SystemPolicyV1Beta1BlockingStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1Beta1BlockingStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1BlockingStub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public com.google.cloud.binaryauthorization.v1beta1.Policy getSystemPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getGetSystemPolicyMethod(), getCallOptions(), request); - } - } - - /** - * - * - *
-   * API for working with the system policy.
-   * 
- */ - public static final class SystemPolicyV1Beta1FutureStub - extends io.grpc.stub.AbstractFutureStub { - private SystemPolicyV1Beta1FutureStub( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - super(channel, callOptions); - } - - @java.lang.Override - protected SystemPolicyV1Beta1FutureStub build( - io.grpc.Channel channel, io.grpc.CallOptions callOptions) { - return new SystemPolicyV1Beta1FutureStub(channel, callOptions); - } - - /** - * - * - *
-     * Gets the current system policy in the specified location.
-     * 
- */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.cloud.binaryauthorization.v1beta1.Policy> - getSystemPolicy( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getGetSystemPolicyMethod(), getCallOptions()), request); - } - } - - private static final int METHODID_GET_SYSTEM_POLICY = 0; - - 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 SystemPolicyV1Beta1ImplBase serviceImpl; - private final int methodId; - - MethodHandlers(SystemPolicyV1Beta1ImplBase 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_GET_SYSTEM_POLICY: - serviceImpl.getSystemPolicy( - (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; - default: - throw new AssertionError(); - } - } - - @java.lang.Override - @java.lang.SuppressWarnings("unchecked") - public io.grpc.stub.StreamObserver invoke( - io.grpc.stub.StreamObserver responseObserver) { - switch (methodId) { - default: - throw new AssertionError(); - } - } - } - - private abstract static class SystemPolicyV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoFileDescriptorSupplier, - io.grpc.protobuf.ProtoServiceDescriptorSupplier { - SystemPolicyV1Beta1BaseDescriptorSupplier() {} - - @java.lang.Override - public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .getDescriptor(); - } - - @java.lang.Override - public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { - return getFileDescriptor().findServiceByName("SystemPolicyV1Beta1"); - } - } - - private static final class SystemPolicyV1Beta1FileDescriptorSupplier - extends SystemPolicyV1Beta1BaseDescriptorSupplier { - SystemPolicyV1Beta1FileDescriptorSupplier() {} - } - - private static final class SystemPolicyV1Beta1MethodDescriptorSupplier - extends SystemPolicyV1Beta1BaseDescriptorSupplier - implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { - private final String methodName; - - SystemPolicyV1Beta1MethodDescriptorSupplier(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 (SystemPolicyV1Beta1Grpc.class) { - result = serviceDescriptor; - if (result == null) { - serviceDescriptor = - result = - io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) - .setSchemaDescriptor(new SystemPolicyV1Beta1FileDescriptorSupplier()) - .addMethod(getGetSystemPolicyMethod()) - .build(); - } - } - } - return result; - } -} diff --git a/java.header b/java.header deleted file mode 100644 index d0970ba7..00000000 --- a/java.header +++ /dev/null @@ -1,15 +0,0 @@ -^/\*$ -^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$ -^ \*$ -^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ -^ \* you may not use this file except in compliance with the License\.$ -^ \* You may obtain a copy of the License at$ -^ \*$ -^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ -^ \*$ -^ \* Unless required by applicable law or agreed to in writing, software$ -^ \* distributed under the License is distributed on an "AS IS" BASIS,$ -^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ -^ \* See the License for the specific language governing permissions and$ -^ \* limitations under the License\.$ -^ \*/$ diff --git a/license-checks.xml b/license-checks.xml deleted file mode 100644 index 6597fced..00000000 --- a/license-checks.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - diff --git a/pom.xml b/pom.xml deleted file mode 100644 index dd29d014..00000000 --- a/pom.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-binary-authorization-parent - pom - 1.2.9-SNAPSHOT - Google Binary Authorization Parent - https://github.com/googleapis/java-binary-authorization - - Java idiomatic client for Google Cloud Platform services. - - - - com.google.cloud - google-cloud-shared-config - 1.5.3 - - - - - chingor - Jeff Ching - chingor@google.com - Google - - Developer - - - - - Google LLC - - - scm:git:git@github.com:googleapis/java-binary-authorization.git - scm:git:git@github.com:googleapis/java-binary-authorization.git - https://github.com/googleapis/java-binary-authorization - HEAD - - - https://github.com/googleapis/java-binary-authorization/issues - GitHub Issues - - - - Apache-2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt - - - - - UTF-8 - UTF-8 - github - google-cloud-binary-authorization-parent - - - - - - com.google.cloud - google-cloud-binary-authorization - 1.2.9-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - - - com.google.api.grpc - grpc-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - - - com.google.api.grpc - proto-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - - - - io.grafeas - grafeas - 2.4.7 - - - io.perfmark - perfmark-api - 0.25.0 - - - com.google.cloud - google-cloud-shared-dependencies - 3.0.4 - pom - import - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - org.objenesis:objenesis - javax.annotation:javax.annotation-api - - - - - - - - - google-cloud-binary-authorization - grpc-google-cloud-binary-authorization-v1beta1 - grpc-google-cloud-binary-authorization-v1 - proto-google-cloud-binary-authorization-v1beta1 - proto-google-cloud-binary-authorization-v1 - google-cloud-binary-authorization-bom - - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 3.4.1 - - - - index - dependency-info - team - ci-management - issue-management - licenses - scm - dependency-management - distribution-management - summary - modules - - - - - true - ${site.installationModule} - jar - - - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.1 - - - html - - aggregate - javadoc - - - - - none - protected - true - ${project.build.directory}/javadoc - - - Test helpers packages - com.google.cloud.testing - - - SPI packages - com.google.cloud.spi* - - - - - https://grpc.io/grpc-java/javadoc/ - https://developers.google.com/protocol-buffers/docs/reference/java/ - https://googleapis.dev/java/google-auth-library/latest/ - https://googleapis.dev/java/gax/latest/ - https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ - - - - - - diff --git a/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml b/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml deleted file mode 100644 index 70e35c15..00000000 --- a/proto-google-cloud-binary-authorization-v1/clirr-ignored-differences.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/proto-google-cloud-binary-authorization-v1/pom.xml b/proto-google-cloud-binary-authorization-v1/pom.xml deleted file mode 100644 index f6008c2f..00000000 --- a/proto-google-cloud-binary-authorization-v1/pom.xml +++ /dev/null @@ -1,46 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-binary-authorization-v1 - 1.2.9-SNAPSHOT - proto-google-cloud-binary-authorization-v1 - Proto library for google-cloud-binary-authorization - - com.google.cloud - google-cloud-binary-authorization-parent - 1.2.9-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - io.grafeas - grafeas - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java deleted file mode 100644 index 9a37b606..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/AttestorName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class AttestorName implements ResourceName { - private static final PathTemplate PROJECT_ATTESTOR = - PathTemplate.createWithoutUrlEncoding("projects/{project}/attestors/{attestor}"); - private volatile Map fieldValuesMap; - private final String project; - private final String attestor; - - @Deprecated - protected AttestorName() { - project = null; - attestor = null; - } - - private AttestorName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - attestor = Preconditions.checkNotNull(builder.getAttestor()); - } - - public String getProject() { - return project; - } - - public String getAttestor() { - return attestor; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static AttestorName of(String project, String attestor) { - return newBuilder().setProject(project).setAttestor(attestor).build(); - } - - public static String format(String project, String attestor) { - return newBuilder().setProject(project).setAttestor(attestor).build().toString(); - } - - public static AttestorName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_ATTESTOR.validatedMatch( - formattedString, "AttestorName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("attestor")); - } - - 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 (AttestorName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_ATTESTOR.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 (attestor != null) { - fieldMapBuilder.put("attestor", attestor); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_ATTESTOR.instantiate("project", project, "attestor", attestor); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - AttestorName that = ((AttestorName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.attestor, that.attestor); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(attestor); - return h; - } - - /** Builder for projects/{project}/attestors/{attestor}. */ - public static class Builder { - private String project; - private String attestor; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getAttestor() { - return attestor; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setAttestor(String attestor) { - this.attestor = attestor; - return this; - } - - private Builder(AttestorName attestorName) { - this.project = attestorName.project; - this.attestor = attestorName.attestor; - } - - public AttestorName build() { - return new AttestorName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java deleted file mode 100644 index 325af76b..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/PolicyName.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -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 PolicyName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}/policy"); - private static final PathTemplate LOCATION = - PathTemplate.createWithoutUrlEncoding("locations/{location}/policy"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - - @Deprecated - protected PolicyName() { - project = null; - location = null; - } - - private PolicyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = null; - pathTemplate = PROJECT; - } - - private PolicyName(LocationBuilder builder) { - location = Preconditions.checkNotNull(builder.getLocation()); - project = null; - pathTemplate = LOCATION; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static LocationBuilder newLocationBuilder() { - return new LocationBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static PolicyName of(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static PolicyName ofProjectName(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static PolicyName ofLocationName(String location) { - return newLocationBuilder().setLocation(location).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectName(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatLocationName(String location) { - return newLocationBuilder().setLocation(location).build().toString(); - } - - public static PolicyName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT.matches(formattedString)) { - Map matchMap = PROJECT.match(formattedString); - return ofProjectName(matchMap.get("project")); - } else if (LOCATION.matches(formattedString)) { - Map matchMap = LOCATION.match(formattedString); - return ofLocationName(matchMap.get("location")); - } - throw new ValidationException("PolicyName.parse: formattedString not in valid format"); - } - - 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 (PolicyName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString) || 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 fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - PolicyName that = ((PolicyName) 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(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/policy. */ - 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(PolicyName policyName) { - Preconditions.checkArgument( - Objects.equals(policyName.pathTemplate, PROJECT), - "toBuilder is only supported when PolicyName has the pattern of projects/{project}/policy"); - this.project = policyName.project; - } - - public PolicyName build() { - return new PolicyName(this); - } - } - - /** Builder for locations/{location}/policy. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class LocationBuilder { - private String location; - - protected LocationBuilder() {} - - public String getLocation() { - return location; - } - - public LocationBuilder setLocation(String location) { - this.location = location; - return this; - } - - public PolicyName build() { - return new PolicyName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java deleted file mode 100644 index b38699d8..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class 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) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java deleted file mode 100644 index dd66c601..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Resources.java +++ /dev/null @@ -1,14296 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1/resources.proto - -package com.google.protos.google.cloud.binaryauthorization.v1; - -public final class Resources { - private Resources() {} - - 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 PolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.Policy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - int getGlobalPolicyEvaluationModeValue(); - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode(); - - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - getAdmissionWhitelistPatternsList(); - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index); - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAdmissionWhitelistPatternsCount(); - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList(); - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index); - - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getClusterAdmissionRulesCount(); - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsClusterAdmissionRules(java.lang.String key); - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRules(); - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRulesMap(); - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue); - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getKubernetesNamespaceAdmissionRulesCount(); - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key); - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRules(); - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRulesMap(); - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue); - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getKubernetesServiceAccountAdmissionRulesCount(); - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key); - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRules(); - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRulesMap(); - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue); - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getIstioServiceIdentityAdmissionRulesCount(); - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key); - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRules(); - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRulesMap(); - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue); - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - boolean hasDefaultAdmissionRule(); - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultAdmissionRule(); - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder(); - - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - } - /** - * - * - *
-   * A [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.Policy} - */ - public static final class Policy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.Policy) - PolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Policy.newBuilder() to construct. - private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Policy() { - name_ = ""; - description_ = ""; - globalPolicyEvaluationMode_ = 0; - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Policy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterAdmissionRules(); - case 10: - return internalGetKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder.class); - } - - /** - * Protobuf enum {@code google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode} - */ - public enum GlobalPolicyEvaluationMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Not specified: DISABLE is assumed.
-       * 
- * - * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - */ - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED(0), - /** - * - * - *
-       * Enables system policy evaluation.
-       * 
- * - * ENABLE = 1; - */ - ENABLE(1), - /** - * - * - *
-       * Disables system policy evaluation.
-       * 
- * - * DISABLE = 2; - */ - DISABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Not specified: DISABLE is assumed.
-       * 
- * - * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - */ - public static final int GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * Enables system policy evaluation.
-       * 
- * - * ENABLE = 1; - */ - public static final int ENABLE_VALUE = 1; - /** - * - * - *
-       * Disables system policy evaluation.
-       * 
- * - * DISABLE = 2; - */ - public static final int DISABLE_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 GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode forNumber(int value) { - switch (value) { - case 0: - return GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED; - case 1: - return ENABLE; - case 2: - return DISABLE; - 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 GlobalPolicyEvaluationMode findValueByNumber(int number) { - return GlobalPolicyEvaluationMode.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.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final GlobalPolicyEvaluationMode[] VALUES = values(); - - public static GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * 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 DESCRIPTION_FIELD_NUMBER = 6; - private volatile java.lang.Object description_; - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.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 GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER = 7; - private int globalPolicyEvaluationMode_; - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - @java.lang.Override - public int getGlobalPolicyEvaluationModeValue() { - return globalPolicyEvaluationMode_; - } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.valueOf(globalPolicyEvaluationMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.UNRECOGNIZED - : result; - } - - public static final int ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER = 2; - private java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - admissionWhitelistPatterns_; - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - getAdmissionWhitelistPatternsList() { - return admissionWhitelistPatterns_; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList() { - return admissionWhitelistPatterns_; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getAdmissionWhitelistPatternsCount() { - return admissionWhitelistPatterns_.size(); - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index) { - return admissionWhitelistPatterns_.get(index); - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index) { - return admissionWhitelistPatterns_.get(index); - } - - public static final int CLUSTER_ADMISSION_RULES_FIELD_NUMBER = 3; - - private static final class ClusterAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule.getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - clusterAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetClusterAdmissionRules() { - if (clusterAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return clusterAdmissionRules_; - } - - public int getClusterAdmissionRulesCount() { - return internalGetClusterAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetClusterAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRules() { - return getClusterAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRulesMap() { - return internalGetClusterAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetClusterAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetClusterAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER = 10; - - private static final class KubernetesNamespaceAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule.getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesNamespaceAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetKubernetesNamespaceAdmissionRules() { - if (kubernetesNamespaceAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesNamespaceAdmissionRules_; - } - - public int getKubernetesNamespaceAdmissionRulesCount() { - return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRules() { - return getKubernetesNamespaceAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRulesMap() { - return internalGetKubernetesNamespaceAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     * [a-z.-]+, e.g. 'some-namespace'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER = 8; - - private static final class KubernetesServiceAccountAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule.getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesServiceAccountAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetKubernetesServiceAccountAdmissionRules() { - if (kubernetesServiceAccountAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesServiceAccountAdmissionRules_; - } - - public int getKubernetesServiceAccountAdmissionRulesCount() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRules() { - return getKubernetesServiceAccountAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRulesMap() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER = 9; - - private static final class IstioServiceIdentityAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule.getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - istioServiceIdentityAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetIstioServiceIdentityAdmissionRules() { - if (istioServiceIdentityAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return istioServiceIdentityAdmissionRules_; - } - - public int getIstioServiceIdentityAdmissionRulesCount() { - return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRules() { - return getIstioServiceIdentityAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRulesMap() { - return internalGetIstioServiceIdentityAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-     * <domain>/ns/<namespace>/sa/<serviceaccount>
-     * e.g. spiffe://example.com/ns/test-ns/sa/default
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int DEFAULT_ADMISSION_RULE_FIELD_NUMBER = 4; - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultAdmissionRule_; - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - @java.lang.Override - public boolean hasDefaultAdmissionRule() { - return defaultAdmissionRule_ != null; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultAdmissionRule() { - return defaultAdmissionRule_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDefaultInstance() - : defaultAdmissionRule_; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder() { - return getDefaultAdmissionRule(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { - output.writeMessage(2, admissionWhitelistPatterns_.get(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetClusterAdmissionRules(), - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry, - 3); - if (defaultAdmissionRule_ != null) { - output.writeMessage(4, getDefaultAdmissionRule()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - if (globalPolicyEvaluationMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(7, globalPolicyEvaluationMode_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetKubernetesServiceAccountAdmissionRules(), - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry, - 8); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetIstioServiceIdentityAdmissionRules(), - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry, - 9); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetKubernetesNamespaceAdmissionRules(), - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, - 10); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, admissionWhitelistPatterns_.get(i)); - } - for (java.util.Map.Entry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - entry : internalGetClusterAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - clusterAdmissionRules__ = - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(3, clusterAdmissionRules__); - } - if (defaultAdmissionRule_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDefaultAdmissionRule()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - if (globalPolicyEvaluationMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - size += - com.google.protobuf.CodedOutputStream.computeEnumSize(7, globalPolicyEvaluationMode_); - } - for (java.util.Map.Entry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - entry : internalGetKubernetesServiceAccountAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, kubernetesServiceAccountAdmissionRules__); - } - for (java.util.Map.Entry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - entry : internalGetIstioServiceIdentityAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - istioServiceIdentityAdmissionRules__ = - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, istioServiceIdentityAdmissionRules__); - } - for (java.util.Map.Entry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - entry : internalGetKubernetesNamespaceAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, kubernetesNamespaceAdmissionRules__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (globalPolicyEvaluationMode_ != other.globalPolicyEvaluationMode_) return false; - if (!getAdmissionWhitelistPatternsList().equals(other.getAdmissionWhitelistPatternsList())) - return false; - if (!internalGetClusterAdmissionRules().equals(other.internalGetClusterAdmissionRules())) - return false; - if (!internalGetKubernetesNamespaceAdmissionRules() - .equals(other.internalGetKubernetesNamespaceAdmissionRules())) return false; - if (!internalGetKubernetesServiceAccountAdmissionRules() - .equals(other.internalGetKubernetesServiceAccountAdmissionRules())) return false; - if (!internalGetIstioServiceIdentityAdmissionRules() - .equals(other.internalGetIstioServiceIdentityAdmissionRules())) return false; - if (hasDefaultAdmissionRule() != other.hasDefaultAdmissionRule()) return false; - if (hasDefaultAdmissionRule()) { - if (!getDefaultAdmissionRule().equals(other.getDefaultAdmissionRule())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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(); - hash = (37 * hash) + GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER; - hash = (53 * hash) + globalPolicyEvaluationMode_; - if (getAdmissionWhitelistPatternsCount() > 0) { - hash = (37 * hash) + ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER; - hash = (53 * hash) + getAdmissionWhitelistPatternsList().hashCode(); - } - if (!internalGetClusterAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + CLUSTER_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetClusterAdmissionRules().hashCode(); - } - if (!internalGetKubernetesNamespaceAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetKubernetesNamespaceAdmissionRules().hashCode(); - } - if (!internalGetKubernetesServiceAccountAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetKubernetesServiceAccountAdmissionRules().hashCode(); - } - if (!internalGetIstioServiceIdentityAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetIstioServiceIdentityAdmissionRules().hashCode(); - } - if (hasDefaultAdmissionRule()) { - hash = (37 * hash) + DEFAULT_ADMISSION_RULE_FIELD_NUMBER; - hash = (53 * hash) + getDefaultAdmissionRule().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.Policy} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.Policy) - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterAdmissionRules(); - case 10: - return internalGetKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableClusterAdmissionRules(); - case 10: - return internalGetMutableKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetMutableKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetMutableIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder - .class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - globalPolicyEvaluationMode_ = 0; - - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - } else { - admissionWhitelistPatterns_ = null; - admissionWhitelistPatternsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableClusterAdmissionRules().clear(); - internalGetMutableKubernetesNamespaceAdmissionRules().clear(); - internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); - internalGetMutableIstioServiceIdentityAdmissionRules().clear(); - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = null; - } else { - defaultAdmissionRule_ = null; - defaultAdmissionRuleBuilder_ = 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.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.globalPolicyEvaluationMode_ = globalPolicyEvaluationMode_; - if (admissionWhitelistPatternsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.admissionWhitelistPatterns_ = admissionWhitelistPatterns_; - } else { - result.admissionWhitelistPatterns_ = admissionWhitelistPatternsBuilder_.build(); - } - result.clusterAdmissionRules_ = internalGetClusterAdmissionRules(); - result.clusterAdmissionRules_.makeImmutable(); - result.kubernetesNamespaceAdmissionRules_ = internalGetKubernetesNamespaceAdmissionRules(); - result.kubernetesNamespaceAdmissionRules_.makeImmutable(); - result.kubernetesServiceAccountAdmissionRules_ = - internalGetKubernetesServiceAccountAdmissionRules(); - result.kubernetesServiceAccountAdmissionRules_.makeImmutable(); - result.istioServiceIdentityAdmissionRules_ = - internalGetIstioServiceIdentityAdmissionRules(); - result.istioServiceIdentityAdmissionRules_.makeImmutable(); - if (defaultAdmissionRuleBuilder_ == null) { - result.defaultAdmissionRule_ = defaultAdmissionRule_; - } else { - result.defaultAdmissionRule_ = defaultAdmissionRuleBuilder_.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.protos.google.cloud.binaryauthorization.v1.Resources.Policy) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.globalPolicyEvaluationMode_ != 0) { - setGlobalPolicyEvaluationModeValue(other.getGlobalPolicyEvaluationModeValue()); - } - if (admissionWhitelistPatternsBuilder_ == null) { - if (!other.admissionWhitelistPatterns_.isEmpty()) { - if (admissionWhitelistPatterns_.isEmpty()) { - admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.addAll(other.admissionWhitelistPatterns_); - } - onChanged(); - } - } else { - if (!other.admissionWhitelistPatterns_.isEmpty()) { - if (admissionWhitelistPatternsBuilder_.isEmpty()) { - admissionWhitelistPatternsBuilder_.dispose(); - admissionWhitelistPatternsBuilder_ = null; - admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; - bitField0_ = (bitField0_ & ~0x00000001); - admissionWhitelistPatternsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAdmissionWhitelistPatternsFieldBuilder() - : null; - } else { - admissionWhitelistPatternsBuilder_.addAllMessages(other.admissionWhitelistPatterns_); - } - } - } - internalGetMutableClusterAdmissionRules() - .mergeFrom(other.internalGetClusterAdmissionRules()); - internalGetMutableKubernetesNamespaceAdmissionRules() - .mergeFrom(other.internalGetKubernetesNamespaceAdmissionRules()); - internalGetMutableKubernetesServiceAccountAdmissionRules() - .mergeFrom(other.internalGetKubernetesServiceAccountAdmissionRules()); - internalGetMutableIstioServiceIdentityAdmissionRules() - .mergeFrom(other.internalGetIstioServiceIdentityAdmissionRules()); - if (other.hasDefaultAdmissionRule()) { - mergeDefaultAdmissionRule(other.getDefaultAdmissionRule()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - m = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.parser(), - extensionRegistry); - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(m); - } else { - admissionWhitelistPatternsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - clusterAdmissionRules__ = - input.readMessage( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableClusterAdmissionRules() - .getMutableMap() - .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); - break; - } // case 26 - case 34: - { - input.readMessage( - getDefaultAdmissionRuleFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 34 - case 42: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - case 50: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 50 - case 56: - { - globalPolicyEvaluationMode_ = input.readEnum(); - - break; - } // case 56 - case 66: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - input.readMessage( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableKubernetesServiceAccountAdmissionRules() - .getMutableMap() - .put( - kubernetesServiceAccountAdmissionRules__.getKey(), - kubernetesServiceAccountAdmissionRules__.getValue()); - break; - } // case 66 - case 74: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - istioServiceIdentityAdmissionRules__ = - input.readMessage( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableIstioServiceIdentityAdmissionRules() - .getMutableMap() - .put( - istioServiceIdentityAdmissionRules__.getKey(), - istioServiceIdentityAdmissionRules__.getValue()); - break; - } // case 74 - case 82: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - input.readMessage( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableKubernetesNamespaceAdmissionRules() - .getMutableMap() - .put( - kubernetesNamespaceAdmissionRules__.getKey(), - kubernetesNamespaceAdmissionRules__.getValue()); - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Output only. The resource name, in the format `projects/*/policy`. There is
-       * at most one policy per project.
-       * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Output only. The resource name, in the format `projects/*/policy`. There is
-       * at most one policy per project.
-       * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Output only. The resource name, in the format `projects/*/policy`. There is
-       * at most one policy per project.
-       * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The resource name, in the format `projects/*/policy`. There is
-       * at most one policy per project.
-       * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. The resource name, in the format `projects/*/policy`. There is
-       * at most one policy per project.
-       * 
- * - * 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 description_ = ""; - /** - * - * - *
-       * Optional. A descriptive comment.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment.
-       * 
- * - * string description = 6 [(.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 int globalPolicyEvaluationMode_ = 0; - /** - * - * - *
-       * Optional. Controls the evaluation of a Google-maintained global admission
-       * policy for common system-level images. Images not covered by the global
-       * policy will be subject to the project admission policy. This setting
-       * has no effect when specified inside a global admission policy.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - @java.lang.Override - public int getGlobalPolicyEvaluationModeValue() { - return globalPolicyEvaluationMode_; - } - /** - * - * - *
-       * Optional. Controls the evaluation of a Google-maintained global admission
-       * policy for common system-level images. Images not covered by the global
-       * policy will be subject to the project admission policy. This setting
-       * has no effect when specified inside a global admission policy.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for globalPolicyEvaluationMode to set. - * @return This builder for chaining. - */ - public Builder setGlobalPolicyEvaluationModeValue(int value) { - - globalPolicyEvaluationMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. Controls the evaluation of a Google-maintained global admission
-       * policy for common system-level images. Images not covered by the global
-       * policy will be subject to the project admission policy. This setting
-       * has no effect when specified inside a global admission policy.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.valueOf(globalPolicyEvaluationMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Optional. Controls the evaluation of a Google-maintained global admission
-       * policy for common system-level images. Images not covered by the global
-       * policy will be subject to the project admission policy. This setting
-       * has no effect when specified inside a global admission policy.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The globalPolicyEvaluationMode to set. - * @return This builder for chaining. - */ - public Builder setGlobalPolicyEvaluationMode( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .GlobalPolicyEvaluationMode - value) { - if (value == null) { - throw new NullPointerException(); - } - - globalPolicyEvaluationMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. Controls the evaluation of a Google-maintained global admission
-       * policy for common system-level images. Images not covered by the global
-       * policy will be subject to the project admission policy. This setting
-       * has no effect when specified inside a global admission policy.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearGlobalPolicyEvaluationMode() { - - globalPolicyEvaluationMode_ = 0; - onChanged(); - return this; - } - - private java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - - private void ensureAdmissionWhitelistPatternsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern>(admissionWhitelistPatterns_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder> - admissionWhitelistPatternsBuilder_; - - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - getAdmissionWhitelistPatternsList() { - if (admissionWhitelistPatternsBuilder_ == null) { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } else { - return admissionWhitelistPatternsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getAdmissionWhitelistPatternsCount() { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.size(); - } else { - return admissionWhitelistPatternsBuilder_.getCount(); - } - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdmissionWhitelistPatterns( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdmissionWhitelistPatterns( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - .Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - .Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - .Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllAdmissionWhitelistPatterns( - java.lang.Iterable< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern> - values) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, admissionWhitelistPatterns_); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAdmissionWhitelistPatterns() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.remove(index); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder - getAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList() { - if (admissionWhitelistPatternsBuilder_ != null) { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder() { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.getDefaultInstance()); - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.getDefaultInstance()); - } - /** - * - * - *
-       * Optional. Admission policy allowlisting. A matching admission request will
-       * always be permitted. This feature is typically used to exclude Google or
-       * third-party infrastructure images from Binary Authorization policies.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder> - getAdmissionWhitelistPatternsBuilderList() { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsFieldBuilder() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatternsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder>( - admissionWhitelistPatterns_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - admissionWhitelistPatterns_ = null; - } - return admissionWhitelistPatternsBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - clusterAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetClusterAdmissionRules() { - if (clusterAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return clusterAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetMutableClusterAdmissionRules() { - onChanged(); - ; - if (clusterAdmissionRules_ == null) { - clusterAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!clusterAdmissionRules_.isMutable()) { - clusterAdmissionRules_ = clusterAdmissionRules_.copy(); - } - return clusterAdmissionRules_; - } - - public int getClusterAdmissionRulesCount() { - return internalGetClusterAdmissionRules().getMap().size(); - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetClusterAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRules() { - return getClusterAdmissionRulesMap(); - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getClusterAdmissionRulesMap() { - return internalGetClusterAdmissionRules().getMap(); - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetClusterAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getClusterAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetClusterAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearClusterAdmissionRules() { - internalGetMutableClusterAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getMutableClusterAdmissionRules() { - return internalGetMutableClusterAdmissionRules().getMutableMap(); - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putClusterAdmissionRules( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * Optional. Per-cluster admission rules. Cluster spec format:
-       * `location.clusterId`. There can be at most one admission rule per cluster
-       * spec.
-       * A `location` is either a compute zone (e.g. us-central1-a) or a region
-       * (e.g. us-central1).
-       * For `clusterId` syntax restrictions see
-       * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllClusterAdmissionRules( - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - values) { - internalGetMutableClusterAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesNamespaceAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetKubernetesNamespaceAdmissionRules() { - if (kubernetesNamespaceAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesNamespaceAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetMutableKubernetesNamespaceAdmissionRules() { - onChanged(); - ; - if (kubernetesNamespaceAdmissionRules_ == null) { - kubernetesNamespaceAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!kubernetesNamespaceAdmissionRules_.isMutable()) { - kubernetesNamespaceAdmissionRules_ = kubernetesNamespaceAdmissionRules_.copy(); - } - return kubernetesNamespaceAdmissionRules_; - } - - public int getKubernetesNamespaceAdmissionRulesCount() { - return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRules() { - return getKubernetesNamespaceAdmissionRulesMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesNamespaceAdmissionRulesMap() { - return internalGetKubernetesNamespaceAdmissionRules().getMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearKubernetesNamespaceAdmissionRules() { - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getMutableKubernetesNamespaceAdmissionRules() { - return internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putKubernetesNamespaceAdmissionRules( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-       * [a-z.-]+, e.g. 'some-namespace'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllKubernetesNamespaceAdmissionRules( - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - values) { - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - kubernetesServiceAccountAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetKubernetesServiceAccountAdmissionRules() { - if (kubernetesServiceAccountAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesServiceAccountAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetMutableKubernetesServiceAccountAdmissionRules() { - onChanged(); - ; - if (kubernetesServiceAccountAdmissionRules_ == null) { - kubernetesServiceAccountAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!kubernetesServiceAccountAdmissionRules_.isMutable()) { - kubernetesServiceAccountAdmissionRules_ = kubernetesServiceAccountAdmissionRules_.copy(); - } - return kubernetesServiceAccountAdmissionRules_; - } - - public int getKubernetesServiceAccountAdmissionRulesCount() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRules() { - return getKubernetesServiceAccountAdmissionRulesMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getKubernetesServiceAccountAdmissionRulesMap() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearKubernetesServiceAccountAdmissionRules() { - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getMutableKubernetesServiceAccountAdmissionRules() { - return internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap(); - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putKubernetesServiceAccountAdmissionRules( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * Optional. Per-kubernetes-service-account admission rules. Service account
-       * spec format: `namespace:serviceaccount`. e.g. 'test-ns:default'
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllKubernetesServiceAccountAdmissionRules( - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - values) { - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - istioServiceIdentityAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetIstioServiceIdentityAdmissionRules() { - if (istioServiceIdentityAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return istioServiceIdentityAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - internalGetMutableIstioServiceIdentityAdmissionRules() { - onChanged(); - ; - if (istioServiceIdentityAdmissionRules_ == null) { - istioServiceIdentityAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!istioServiceIdentityAdmissionRules_.isMutable()) { - istioServiceIdentityAdmissionRules_ = istioServiceIdentityAdmissionRules_.copy(); - } - return istioServiceIdentityAdmissionRules_; - } - - public int getIstioServiceIdentityAdmissionRulesCount() { - return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRules() { - return getIstioServiceIdentityAdmissionRulesMap(); - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getIstioServiceIdentityAdmissionRulesMap() { - return internalGetIstioServiceIdentityAdmissionRules().getMap(); - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearIstioServiceIdentityAdmissionRules() { - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - getMutableIstioServiceIdentityAdmissionRules() { - return internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap(); - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putIstioServiceIdentityAdmissionRules( - java.lang.String key, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-       * Optional. Per-istio-service-identity admission rules. Istio service
-       * identity spec format:
-       * spiffe://<domain>/ns/<namespace>/sa/<serviceaccount> or
-       * <domain>/ns/<namespace>/sa/<serviceaccount>
-       * e.g. spiffe://example.com/ns/test-ns/sa/default
-       * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllIstioServiceIdentityAdmissionRules( - java.util.Map< - java.lang.String, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule> - values) { - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - defaultAdmissionRule_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRuleOrBuilder> - defaultAdmissionRuleBuilder_; - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - public boolean hasDefaultAdmissionRule() { - return defaultAdmissionRuleBuilder_ != null || defaultAdmissionRule_ != null; - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultAdmissionRule() { - if (defaultAdmissionRuleBuilder_ == null) { - return defaultAdmissionRule_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDefaultInstance() - : defaultAdmissionRule_; - } else { - return defaultAdmissionRuleBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDefaultAdmissionRule( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (defaultAdmissionRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - defaultAdmissionRule_ = value; - onChanged(); - } else { - defaultAdmissionRuleBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDefaultAdmissionRule( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder - builderForValue) { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = builderForValue.build(); - onChanged(); - } else { - defaultAdmissionRuleBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDefaultAdmissionRule( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule value) { - if (defaultAdmissionRuleBuilder_ == null) { - if (defaultAdmissionRule_ != null) { - defaultAdmissionRule_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .newBuilder(defaultAdmissionRule_) - .mergeFrom(value) - .buildPartial(); - } else { - defaultAdmissionRule_ = value; - } - onChanged(); - } else { - defaultAdmissionRuleBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDefaultAdmissionRule() { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = null; - onChanged(); - } else { - defaultAdmissionRule_ = null; - defaultAdmissionRuleBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder - getDefaultAdmissionRuleBuilder() { - - onChanged(); - return getDefaultAdmissionRuleFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder() { - if (defaultAdmissionRuleBuilder_ != null) { - return defaultAdmissionRuleBuilder_.getMessageOrBuilder(); - } else { - return defaultAdmissionRule_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDefaultInstance() - : defaultAdmissionRule_; - } - } - /** - * - * - *
-       * Required. Default admission rule for a cluster without a per-cluster, per-
-       * kubernetes-service-account, or per-istio-service-identity admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRuleOrBuilder> - getDefaultAdmissionRuleFieldBuilder() { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRuleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRuleOrBuilder>( - getDefaultAdmissionRule(), getParentForChildren(), isClean()); - defaultAdmissionRule_ = null; - } - return defaultAdmissionRuleBuilder_; - } - - 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 when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_) - .mergeFrom(value) - .buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-       * Output only. Time when the policy was last updated.
-       * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.Policy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.Policy) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Policy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface AdmissionWhitelistPatternOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` wildcard, but this is allowed only in
-     * text after the `registry/` part. This also supports a trailing `**`
-     * wildcard which matches subdirectories of a given entry.
-     * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - java.lang.String getNamePattern(); - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` wildcard, but this is allowed only in
-     * text after the `registry/` part. This also supports a trailing `**`
-     * wildcard which matches subdirectories of a given entry.
-     * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - com.google.protobuf.ByteString getNamePatternBytes(); - } - /** - * - * - *
-   * An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images
-   * from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern} - */ - public static final class AdmissionWhitelistPattern extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) - AdmissionWhitelistPatternOrBuilder { - private static final long serialVersionUID = 0L; - // Use AdmissionWhitelistPattern.newBuilder() to construct. - private AdmissionWhitelistPattern(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AdmissionWhitelistPattern() { - namePattern_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AdmissionWhitelistPattern(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder.class); - } - - public static final int NAME_PATTERN_FIELD_NUMBER = 1; - private volatile java.lang.Object namePattern_; - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` wildcard, but this is allowed only in
-     * text after the `registry/` part. This also supports a trailing `**`
-     * wildcard which matches subdirectories of a given entry.
-     * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - @java.lang.Override - public java.lang.String getNamePattern() { - java.lang.Object ref = namePattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namePattern_ = s; - return s; - } - } - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` wildcard, but this is allowed only in
-     * text after the `registry/` part. This also supports a trailing `**`
-     * wildcard which matches subdirectories of a given entry.
-     * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNamePatternBytes() { - java.lang.Object ref = namePattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namePattern_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern) - obj; - - if (!getNamePattern().equals(other.getNamePattern())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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_PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getNamePattern().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images
-     * from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - namePattern_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern(this); - result.namePattern_ = namePattern_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern.getDefaultInstance()) return this; - if (!other.getNamePattern().isEmpty()) { - namePattern_ = other.namePattern_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - namePattern_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object namePattern_ = ""; - /** - * - * - *
-       * An image name pattern to allowlist, in the form `registry/path/to/image`.
-       * This supports a trailing `*` wildcard, but this is allowed only in
-       * text after the `registry/` part. This also supports a trailing `**`
-       * wildcard which matches subdirectories of a given entry.
-       * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - public java.lang.String getNamePattern() { - java.lang.Object ref = namePattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namePattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * An image name pattern to allowlist, in the form `registry/path/to/image`.
-       * This supports a trailing `*` wildcard, but this is allowed only in
-       * text after the `registry/` part. This also supports a trailing `**`
-       * wildcard which matches subdirectories of a given entry.
-       * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - public com.google.protobuf.ByteString getNamePatternBytes() { - java.lang.Object ref = namePattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namePattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * An image name pattern to allowlist, in the form `registry/path/to/image`.
-       * This supports a trailing `*` wildcard, but this is allowed only in
-       * text after the `registry/` part. This also supports a trailing `**`
-       * wildcard which matches subdirectories of a given entry.
-       * 
- * - * string name_pattern = 1; - * - * @param value The namePattern to set. - * @return This builder for chaining. - */ - public Builder setNamePattern(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - namePattern_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * An image name pattern to allowlist, in the form `registry/path/to/image`.
-       * This supports a trailing `*` wildcard, but this is allowed only in
-       * text after the `registry/` part. This also supports a trailing `**`
-       * wildcard which matches subdirectories of a given entry.
-       * 
- * - * string name_pattern = 1; - * - * @return This builder for chaining. - */ - public Builder clearNamePattern() { - - namePattern_ = getDefaultInstance().getNamePattern(); - onChanged(); - return this; - } - /** - * - * - *
-       * An image name pattern to allowlist, in the form `registry/path/to/image`.
-       * This supports a trailing `*` wildcard, but this is allowed only in
-       * text after the `registry/` part. This also supports a trailing `**`
-       * wildcard which matches subdirectories of a given entry.
-       * 
- * - * string name_pattern = 1; - * - * @param value The bytes for namePattern to set. - * @return This builder for chaining. - */ - public Builder setNamePatternBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - namePattern_ = 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.binaryauthorization.v1.AdmissionWhitelistPattern) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionWhitelistPattern - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AdmissionWhitelistPattern parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionWhitelistPattern - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface AdmissionRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AdmissionRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - int getEvaluationModeValue(); - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode - getEvaluationMode(); - - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - java.util.List getRequireAttestationsByList(); - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - int getRequireAttestationsByCount(); - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - java.lang.String getRequireAttestationsBy(int index); - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - com.google.protobuf.ByteString getRequireAttestationsByBytes(int index); - - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - int getEnforcementModeValue(); - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EnforcementMode - getEnforcementMode(); - } - /** - * - * - *
-   * An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images
-   * used in a pod creation request must be attested to by one or more
-   * [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all
-   * pod creations will be denied.
-   * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern]
-   * are exempted from admission rules and will never block a pod creation.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionRule} - */ - public static final class AdmissionRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AdmissionRule) - AdmissionRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use AdmissionRule.newBuilder() to construct. - private AdmissionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AdmissionRule() { - evaluationMode_ = 0; - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - enforcementMode_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AdmissionRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.Builder - .class); - } - - /** Protobuf enum {@code google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode} */ - public enum EvaluationMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Do not use.
-       * 
- * - * EVALUATION_MODE_UNSPECIFIED = 0; - */ - EVALUATION_MODE_UNSPECIFIED(0), - /** - * - * - *
-       * This rule allows all all pod creations.
-       * 
- * - * ALWAYS_ALLOW = 1; - */ - ALWAYS_ALLOW(1), - /** - * - * - *
-       * This rule allows a pod creation if all the attestors listed in
-       * 'require_attestations_by' have valid attestations for all of the
-       * images in the pod spec.
-       * 
- * - * REQUIRE_ATTESTATION = 2; - */ - REQUIRE_ATTESTATION(2), - /** - * - * - *
-       * This rule denies all pod creations.
-       * 
- * - * ALWAYS_DENY = 3; - */ - ALWAYS_DENY(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Do not use.
-       * 
- * - * EVALUATION_MODE_UNSPECIFIED = 0; - */ - public static final int EVALUATION_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * This rule allows all all pod creations.
-       * 
- * - * ALWAYS_ALLOW = 1; - */ - public static final int ALWAYS_ALLOW_VALUE = 1; - /** - * - * - *
-       * This rule allows a pod creation if all the attestors listed in
-       * 'require_attestations_by' have valid attestations for all of the
-       * images in the pod spec.
-       * 
- * - * REQUIRE_ATTESTATION = 2; - */ - public static final int REQUIRE_ATTESTATION_VALUE = 2; - /** - * - * - *
-       * This rule denies all pod creations.
-       * 
- * - * ALWAYS_DENY = 3; - */ - public static final int ALWAYS_DENY_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 EvaluationMode 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 EvaluationMode forNumber(int value) { - switch (value) { - case 0: - return EVALUATION_MODE_UNSPECIFIED; - case 1: - return ALWAYS_ALLOW; - case 2: - return REQUIRE_ATTESTATION; - case 3: - return ALWAYS_DENY; - 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 EvaluationMode findValueByNumber(int number) { - return EvaluationMode.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.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EvaluationMode[] VALUES = values(); - - public static EvaluationMode 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 EvaluationMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode) - } - - /** - * - * - *
-     * Defines the possible actions when a pod creation is denied by an admission
-     * rule.
-     * 
- * - * Protobuf enum {@code google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode} - */ - public enum EnforcementMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Do not use.
-       * 
- * - * ENFORCEMENT_MODE_UNSPECIFIED = 0; - */ - ENFORCEMENT_MODE_UNSPECIFIED(0), - /** - * - * - *
-       * Enforce the admission rule by blocking the pod creation.
-       * 
- * - * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - */ - ENFORCED_BLOCK_AND_AUDIT_LOG(1), - /** - * - * - *
-       * Dryrun mode: Audit logging only.  This will allow the pod creation as if
-       * the admission request had specified break-glass.
-       * 
- * - * DRYRUN_AUDIT_LOG_ONLY = 2; - */ - DRYRUN_AUDIT_LOG_ONLY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Do not use.
-       * 
- * - * ENFORCEMENT_MODE_UNSPECIFIED = 0; - */ - public static final int ENFORCEMENT_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * Enforce the admission rule by blocking the pod creation.
-       * 
- * - * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - */ - public static final int ENFORCED_BLOCK_AND_AUDIT_LOG_VALUE = 1; - /** - * - * - *
-       * Dryrun mode: Audit logging only.  This will allow the pod creation as if
-       * the admission request had specified break-glass.
-       * 
- * - * DRYRUN_AUDIT_LOG_ONLY = 2; - */ - public static final int DRYRUN_AUDIT_LOG_ONLY_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 EnforcementMode 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 EnforcementMode forNumber(int value) { - switch (value) { - case 0: - return ENFORCEMENT_MODE_UNSPECIFIED; - case 1: - return ENFORCED_BLOCK_AND_AUDIT_LOG; - case 2: - return DRYRUN_AUDIT_LOG_ONLY; - 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 EnforcementMode findValueByNumber(int number) { - return EnforcementMode.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.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDescriptor() - .getEnumTypes() - .get(1); - } - - private static final EnforcementMode[] VALUES = values(); - - public static EnforcementMode 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 EnforcementMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode) - } - - public static final int EVALUATION_MODE_FIELD_NUMBER = 1; - private int evaluationMode_; - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - @java.lang.Override - public int getEvaluationModeValue() { - return evaluationMode_; - } - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode - getEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.valueOf(evaluationMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.UNRECOGNIZED - : result; - } - - public static final int REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList requireAttestationsBy_; - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { - return requireAttestationsBy_; - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - public int getRequireAttestationsByCount() { - return requireAttestationsBy_.size(); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - public java.lang.String getRequireAttestationsBy(int index) { - return requireAttestationsBy_.get(index); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { - return requireAttestationsBy_.getByteString(index); - } - - public static final int ENFORCEMENT_MODE_FIELD_NUMBER = 3; - private int enforcementMode_; - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - @java.lang.Override - public int getEnforcementModeValue() { - return enforcementMode_; - } - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode - getEnforcementMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EnforcementMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.valueOf(enforcementMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.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 (evaluationMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, evaluationMode_); - } - for (int i = 0; i < requireAttestationsBy_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 2, requireAttestationsBy_.getRaw(i)); - } - if (enforcementMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.ENFORCEMENT_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, enforcementMode_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (evaluationMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, evaluationMode_); - } - { - int dataSize = 0; - for (int i = 0; i < requireAttestationsBy_.size(); i++) { - dataSize += computeStringSizeNoTag(requireAttestationsBy_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequireAttestationsByList().size(); - } - if (enforcementMode_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.ENFORCEMENT_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, enforcementMode_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) obj; - - if (evaluationMode_ != other.evaluationMode_) return false; - if (!getRequireAttestationsByList().equals(other.getRequireAttestationsByList())) - return false; - if (enforcementMode_ != other.enforcementMode_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + EVALUATION_MODE_FIELD_NUMBER; - hash = (53 * hash) + evaluationMode_; - if (getRequireAttestationsByCount() > 0) { - hash = (37 * hash) + REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER; - hash = (53 * hash) + getRequireAttestationsByList().hashCode(); - } - hash = (37 * hash) + ENFORCEMENT_MODE_FIELD_NUMBER; - hash = (53 * hash) + enforcementMode_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images
-     * used in a pod creation request must be attested to by one or more
-     * [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all
-     * pod creations will be denied.
-     * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern]
-     * are exempted from admission rules and will never block a pod creation.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AdmissionRule} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AdmissionRule) - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - evaluationMode_ = 0; - - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - enforcementMode_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule(this); - int from_bitField0_ = bitField0_; - result.evaluationMode_ = evaluationMode_; - if (((bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requireAttestationsBy_ = requireAttestationsBy_; - result.enforcementMode_ = enforcementMode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .getDefaultInstance()) return this; - if (other.evaluationMode_ != 0) { - setEvaluationModeValue(other.getEvaluationModeValue()); - } - if (!other.requireAttestationsBy_.isEmpty()) { - if (requireAttestationsBy_.isEmpty()) { - requireAttestationsBy_ = other.requireAttestationsBy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.addAll(other.requireAttestationsBy_); - } - onChanged(); - } - if (other.enforcementMode_ != 0) { - setEnforcementModeValue(other.getEnforcementModeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - evaluationMode_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(s); - break; - } // case 18 - case 24: - { - enforcementMode_ = input.readEnum(); - - break; - } // case 24 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int evaluationMode_ = 0; - /** - * - * - *
-       * Required. How this admission rule will be evaluated.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - @java.lang.Override - public int getEvaluationModeValue() { - return evaluationMode_; - } - /** - * - * - *
-       * Required. How this admission rule will be evaluated.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for evaluationMode to set. - * @return This builder for chaining. - */ - public Builder setEvaluationModeValue(int value) { - - evaluationMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. How this admission rule will be evaluated.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode - getEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule.EvaluationMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.valueOf(evaluationMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Required. How this admission rule will be evaluated.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The evaluationMode to set. - * @return This builder for chaining. - */ - public Builder setEvaluationMode( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EvaluationMode - value) { - if (value == null) { - throw new NullPointerException(); - } - - evaluationMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. How this admission rule will be evaluated.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEvaluationMode() { - - evaluationMode_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList requireAttestationsBy_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRequireAttestationsByIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = - new com.google.protobuf.LazyStringArrayList(requireAttestationsBy_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { - return requireAttestationsBy_.getUnmodifiableView(); - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - public int getRequireAttestationsByCount() { - return requireAttestationsBy_.size(); - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - public java.lang.String getRequireAttestationsBy(int index) { - return requireAttestationsBy_.get(index); - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { - return requireAttestationsBy_.getByteString(index); - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The requireAttestationsBy to set. - * @return This builder for chaining. - */ - public Builder setRequireAttestationsBy(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addRequireAttestationsBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addAllRequireAttestationsBy(java.lang.Iterable values) { - ensureRequireAttestationsByIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requireAttestationsBy_); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRequireAttestationsBy() { - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. The resource names of the attestors that must attest to
-       * a container image, in the format `projects/*/attestors/*`. Each
-       * attestor must exist before a policy can reference it.  To add an attestor
-       * to a policy the principal issuing the policy change request must be able
-       * to read the attestor resource.
-       * Note: this field must be non-empty when the evaluation_mode field specifies
-       * REQUIRE_ATTESTATION, otherwise it must be empty.
-       * 
- * - * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addRequireAttestationsByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(value); - onChanged(); - return this; - } - - private int enforcementMode_ = 0; - /** - * - * - *
-       * Required. The action when a pod creation is denied by the admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - @java.lang.Override - public int getEnforcementModeValue() { - return enforcementMode_; - } - /** - * - * - *
-       * Required. The action when a pod creation is denied by the admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for enforcementMode to set. - * @return This builder for chaining. - */ - public Builder setEnforcementModeValue(int value) { - - enforcementMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The action when a pod creation is denied by the admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode - getEnforcementMode() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.valueOf(enforcementMode_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Required. The action when a pod creation is denied by the admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enforcementMode to set. - * @return This builder for chaining. - */ - public Builder setEnforcementMode( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - .EnforcementMode - value) { - if (value == null) { - throw new NullPointerException(); - } - - enforcementMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The action when a pod creation is denied by the admission rule.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEnforcementMode() { - - enforcementMode_ = 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.binaryauthorization.v1.AdmissionRule) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AdmissionRule) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AdmissionRule - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AdmissionRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AdmissionRule - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface AttestorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.Attestor) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-     * Required. The resource name, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return Whether the userOwnedGrafeasNote field is set. - */ - boolean hasUserOwnedGrafeasNote(); - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return The userOwnedGrafeasNote. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - getUserOwnedGrafeasNote(); - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNoteOrBuilder - getUserOwnedGrafeasNoteOrBuilder(); - - /** - * - * - *
-     * Output only. Time when the attestor was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-     * Output only. Time when the attestor was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-     * Output only. Time when the attestor was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.AttestorTypeCase - getAttestorTypeCase(); - } - /** - * - * - *
-   * An [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image
-   * artifacts. An existing attestor cannot be modified except where
-   * indicated.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.Attestor} - */ - public static final class Attestor extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.Attestor) - AttestorOrBuilder { - private static final long serialVersionUID = 0L; - // Use Attestor.newBuilder() to construct. - private Attestor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Attestor() { - name_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Attestor(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - .class); - } - - private int attestorTypeCase_ = 0; - private java.lang.Object attestorType_; - - public enum AttestorTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - USER_OWNED_GRAFEAS_NOTE(3), - ATTESTORTYPE_NOT_SET(0); - private final int value; - - private AttestorTypeCase(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 AttestorTypeCase valueOf(int value) { - return forNumber(value); - } - - public static AttestorTypeCase forNumber(int value) { - switch (value) { - case 3: - return USER_OWNED_GRAFEAS_NOTE; - case 0: - return ATTESTORTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AttestorTypeCase getAttestorTypeCase() { - return AttestorTypeCase.forNumber(attestorTypeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Required. The resource name, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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 = 6; - private volatile java.lang.Object description_; - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.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 USER_OWNED_GRAFEAS_NOTE_FIELD_NUMBER = 3; - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return Whether the userOwnedGrafeasNote field is set. - */ - @java.lang.Override - public boolean hasUserOwnedGrafeasNote() { - return attestorTypeCase_ == 3; - } - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return The userOwnedGrafeasNote. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - getUserOwnedGrafeasNote() { - if (attestorTypeCase_ == 3) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .getDefaultInstance(); - } - /** - * - * - *
-     * This specifies how an attestation will be read, and how it will be used
-     * during policy enforcement.
-     * 
- * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder - getUserOwnedGrafeasNoteOrBuilder() { - if (attestorTypeCase_ == 3) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .getDefaultInstance(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-     * Output only. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last updated.
-     * 
- * - * - * .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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (attestorTypeCase_ == 3) { - output.writeMessage( - 3, - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) - attestorType_); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (attestorTypeCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getAttestorTypeCase().equals(other.getAttestorTypeCase())) return false; - switch (attestorTypeCase_) { - case 3: - if (!getUserOwnedGrafeasNote().equals(other.getUserOwnedGrafeasNote())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - switch (attestorTypeCase_) { - case 3: - hash = (37 * hash) + USER_OWNED_GRAFEAS_NOTE_FIELD_NUMBER; - hash = (53 * hash) + getUserOwnedGrafeasNote().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image
-     * artifacts. An existing attestor cannot be modified except where
-     * indicated.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.Attestor} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.Attestor) - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - .class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - if (userOwnedGrafeasNoteBuilder_ != null) { - userOwnedGrafeasNoteBuilder_.clear(); - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - attestorTypeCase_ = 0; - attestorType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor(this); - result.name_ = name_; - result.description_ = description_; - if (attestorTypeCase_ == 3) { - if (userOwnedGrafeasNoteBuilder_ == null) { - result.attestorType_ = attestorType_; - } else { - result.attestorType_ = userOwnedGrafeasNoteBuilder_.build(); - } - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.attestorTypeCase_ = attestorTypeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - switch (other.getAttestorTypeCase()) { - case USER_OWNED_GRAFEAS_NOTE: - { - mergeUserOwnedGrafeasNote(other.getUserOwnedGrafeasNote()); - break; - } - case ATTESTORTYPE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - input.readMessage( - getUserOwnedGrafeasNoteFieldBuilder().getBuilder(), extensionRegistry); - attestorTypeCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 34 - case 50: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int attestorTypeCase_ = 0; - private java.lang.Object attestorType_; - - public AttestorTypeCase getAttestorTypeCase() { - return AttestorTypeCase.forNumber(attestorTypeCase_); - } - - public Builder clearAttestorType() { - attestorTypeCase_ = 0; - attestorType_ = null; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Required. The resource name, in the format:
-       * `projects/*/attestors/*`. This field may not be updated.
-       * 
- * - * 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, in the format:
-       * `projects/*/attestors/*`. This field may not be updated.
-       * 
- * - * 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, in the format:
-       * `projects/*/attestors/*`. This field may not be updated.
-       * 
- * - * 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, in the format:
-       * `projects/*/attestors/*`. This field may not be updated.
-       * 
- * - * 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, in the format:
-       * `projects/*/attestors/*`. This field may not be updated.
-       * 
- * - * 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_ = ""; - /** - * - * - *
-       * Optional. A descriptive comment.  This field may be updated.
-       * The field may be displayed in chooser dialogs.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment.  This field may be updated.
-       * The field may be displayed in chooser dialogs.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment.  This field may be updated.
-       * The field may be displayed in chooser dialogs.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment.  This field may be updated.
-       * The field may be displayed in chooser dialogs.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment.  This field may be updated.
-       * The field may be displayed in chooser dialogs.
-       * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder> - userOwnedGrafeasNoteBuilder_; - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return Whether the userOwnedGrafeasNote field is set. - */ - @java.lang.Override - public boolean hasUserOwnedGrafeasNote() { - return attestorTypeCase_ == 3; - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - * - * @return The userOwnedGrafeasNote. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - getUserOwnedGrafeasNote() { - if (userOwnedGrafeasNoteBuilder_ == null) { - if (attestorTypeCase_ == 3) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.getDefaultInstance(); - } else { - if (attestorTypeCase_ == 3) { - return userOwnedGrafeasNoteBuilder_.getMessage(); - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.getDefaultInstance(); - } - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - public Builder setUserOwnedGrafeasNote( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - value) { - if (userOwnedGrafeasNoteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestorType_ = value; - onChanged(); - } else { - userOwnedGrafeasNoteBuilder_.setMessage(value); - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - public Builder setUserOwnedGrafeasNote( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder - builderForValue) { - if (userOwnedGrafeasNoteBuilder_ == null) { - attestorType_ = builderForValue.build(); - onChanged(); - } else { - userOwnedGrafeasNoteBuilder_.setMessage(builderForValue.build()); - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - public Builder mergeUserOwnedGrafeasNote( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - value) { - if (userOwnedGrafeasNoteBuilder_ == null) { - if (attestorTypeCase_ == 3 - && attestorType_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.getDefaultInstance()) { - attestorType_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .newBuilder( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_) - .mergeFrom(value) - .buildPartial(); - } else { - attestorType_ = value; - } - onChanged(); - } else { - if (attestorTypeCase_ == 3) { - userOwnedGrafeasNoteBuilder_.mergeFrom(value); - } else { - userOwnedGrafeasNoteBuilder_.setMessage(value); - } - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - public Builder clearUserOwnedGrafeasNote() { - if (userOwnedGrafeasNoteBuilder_ == null) { - if (attestorTypeCase_ == 3) { - attestorTypeCase_ = 0; - attestorType_ = null; - onChanged(); - } - } else { - if (attestorTypeCase_ == 3) { - attestorTypeCase_ = 0; - attestorType_ = null; - } - userOwnedGrafeasNoteBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder - getUserOwnedGrafeasNoteBuilder() { - return getUserOwnedGrafeasNoteFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder - getUserOwnedGrafeasNoteOrBuilder() { - if ((attestorTypeCase_ == 3) && (userOwnedGrafeasNoteBuilder_ != null)) { - return userOwnedGrafeasNoteBuilder_.getMessageOrBuilder(); - } else { - if (attestorTypeCase_ == 3) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.getDefaultInstance(); - } - } - /** - * - * - *
-       * This specifies how an attestation will be read, and how it will be used
-       * during policy enforcement.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote user_owned_grafeas_note = 3; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder> - getUserOwnedGrafeasNoteFieldBuilder() { - if (userOwnedGrafeasNoteBuilder_ == null) { - if (!(attestorTypeCase_ == 3)) { - attestorType_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .getDefaultInstance(); - } - userOwnedGrafeasNoteBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder>( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote) - attestorType_, - getParentForChildren(), - isClean()); - attestorType_ = null; - } - attestorTypeCase_ = 3; - onChanged(); - ; - return userOwnedGrafeasNoteBuilder_; - } - - 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 when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.Attestor) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.Attestor) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Attestor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UserOwnedGrafeasNoteOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The Grafeas resource name of a Attestation.Authority Note,
-     * created by the user, in the format: `projects/*/notes/*`. This field may
-     * not be updated.
-     * An attestation by this attestor is stored as a Grafeas
-     * Attestation.Authority Occurrence that names a container image and that
-     * links to this Note. Grafeas is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - java.lang.String getNoteReference(); - /** - * - * - *
-     * Required. The Grafeas resource name of a Attestation.Authority Note,
-     * created by the user, in the format: `projects/*/notes/*`. This field may
-     * not be updated.
-     * An attestation by this attestor is stored as a Grafeas
-     * Attestation.Authority Occurrence that names a container image and that
-     * links to this Note. Grafeas is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - com.google.protobuf.ByteString getNoteReferenceBytes(); - - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> - getPublicKeysList(); - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey getPublicKeys( - int index); - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPublicKeysCount(); - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder> - getPublicKeysOrBuilderList(); - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKeyOrBuilder - getPublicKeysOrBuilder(int index); - - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - java.lang.String getDelegationServiceAccountEmail(); - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes(); - } - /** - * - * - *
-   * An [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas
-   * Attestation.Authority Note created by the user.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote} - */ - public static final class UserOwnedGrafeasNote extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) - UserOwnedGrafeasNoteOrBuilder { - private static final long serialVersionUID = 0L; - // Use UserOwnedGrafeasNote.newBuilder() to construct. - private UserOwnedGrafeasNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UserOwnedGrafeasNote() { - noteReference_ = ""; - publicKeys_ = java.util.Collections.emptyList(); - delegationServiceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UserOwnedGrafeasNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder.class); - } - - public static final int NOTE_REFERENCE_FIELD_NUMBER = 1; - private volatile java.lang.Object noteReference_; - /** - * - * - *
-     * Required. The Grafeas resource name of a Attestation.Authority Note,
-     * created by the user, in the format: `projects/*/notes/*`. This field may
-     * not be updated.
-     * An attestation by this attestor is stored as a Grafeas
-     * Attestation.Authority Occurrence that names a container image and that
-     * links to this Note. Grafeas is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - @java.lang.Override - public java.lang.String getNoteReference() { - java.lang.Object ref = noteReference_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteReference_ = s; - return s; - } - } - /** - * - * - *
-     * Required. The Grafeas resource name of a Attestation.Authority Note,
-     * created by the user, in the format: `projects/*/notes/*`. This field may
-     * not be updated.
-     * An attestation by this attestor is stored as a Grafeas
-     * Attestation.Authority Occurrence that names a container image and that
-     * links to this Note. Grafeas is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNoteReferenceBytes() { - java.lang.Object ref = noteReference_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - noteReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEYS_FIELD_NUMBER = 2; - private java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> - publicKeys_; - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> - getPublicKeysList() { - return publicKeys_; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder> - getPublicKeysOrBuilderList() { - return publicKeys_; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getPublicKeysCount() { - return publicKeys_.size(); - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - getPublicKeys(int index) { - return publicKeys_.get(index); - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder - getPublicKeysOrBuilder(int index) { - return publicKeys_.get(index); - } - - public static final int DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; - private volatile java.lang.Object delegationServiceAccountEmail_; - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - @java.lang.Override - public java.lang.String getDelegationServiceAccountEmail() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - delegationServiceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - delegationServiceAccountEmail_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, noteReference_); - } - for (int i = 0; i < publicKeys_.size(); i++) { - output.writeMessage(2, publicKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 3, delegationServiceAccountEmail_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, noteReference_); - } - for (int i = 0; i < publicKeys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, publicKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 3, delegationServiceAccountEmail_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) - obj; - - if (!getNoteReference().equals(other.getNoteReference())) return false; - if (!getPublicKeysList().equals(other.getPublicKeysList())) return false; - if (!getDelegationServiceAccountEmail().equals(other.getDelegationServiceAccountEmail())) - return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NOTE_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getNoteReference().hashCode(); - if (getPublicKeysCount() > 0) { - hash = (37 * hash) + PUBLIC_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeysList().hashCode(); - } - hash = (37 * hash) + DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getDelegationServiceAccountEmail().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas
-     * Attestation.Authority Note created by the user.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - noteReference_ = ""; - - if (publicKeysBuilder_ == null) { - publicKeys_ = java.util.Collections.emptyList(); - } else { - publicKeys_ = null; - publicKeysBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - delegationServiceAccountEmail_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote(this); - int from_bitField0_ = bitField0_; - result.noteReference_ = noteReference_; - if (publicKeysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.publicKeys_ = publicKeys_; - } else { - result.publicKeys_ = publicKeysBuilder_.build(); - } - result.delegationServiceAccountEmail_ = delegationServiceAccountEmail_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - .getDefaultInstance()) return this; - if (!other.getNoteReference().isEmpty()) { - noteReference_ = other.noteReference_; - onChanged(); - } - if (publicKeysBuilder_ == null) { - if (!other.publicKeys_.isEmpty()) { - if (publicKeys_.isEmpty()) { - publicKeys_ = other.publicKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePublicKeysIsMutable(); - publicKeys_.addAll(other.publicKeys_); - } - onChanged(); - } - } else { - if (!other.publicKeys_.isEmpty()) { - if (publicKeysBuilder_.isEmpty()) { - publicKeysBuilder_.dispose(); - publicKeysBuilder_ = null; - publicKeys_ = other.publicKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - publicKeysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPublicKeysFieldBuilder() - : null; - } else { - publicKeysBuilder_.addAllMessages(other.publicKeys_); - } - } - } - if (!other.getDelegationServiceAccountEmail().isEmpty()) { - delegationServiceAccountEmail_ = other.delegationServiceAccountEmail_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - noteReference_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - m = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey.parser(), - extensionRegistry); - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(m); - } else { - publicKeysBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - delegationServiceAccountEmail_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object noteReference_ = ""; - /** - * - * - *
-       * Required. The Grafeas resource name of a Attestation.Authority Note,
-       * created by the user, in the format: `projects/*/notes/*`. This field may
-       * not be updated.
-       * An attestation by this attestor is stored as a Grafeas
-       * Attestation.Authority Occurrence that names a container image and that
-       * links to this Note. Grafeas is an external dependency.
-       * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - public java.lang.String getNoteReference() { - java.lang.Object ref = noteReference_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteReference_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The Grafeas resource name of a Attestation.Authority Note,
-       * created by the user, in the format: `projects/*/notes/*`. This field may
-       * not be updated.
-       * An attestation by this attestor is stored as a Grafeas
-       * Attestation.Authority Occurrence that names a container image and that
-       * links to this Note. Grafeas is an external dependency.
-       * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - public com.google.protobuf.ByteString getNoteReferenceBytes() { - java.lang.Object ref = noteReference_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - noteReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The Grafeas resource name of a Attestation.Authority Note,
-       * created by the user, in the format: `projects/*/notes/*`. This field may
-       * not be updated.
-       * An attestation by this attestor is stored as a Grafeas
-       * Attestation.Authority Occurrence that names a container image and that
-       * links to this Note. Grafeas is an external dependency.
-       * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The noteReference to set. - * @return This builder for chaining. - */ - public Builder setNoteReference(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - noteReference_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The Grafeas resource name of a Attestation.Authority Note,
-       * created by the user, in the format: `projects/*/notes/*`. This field may
-       * not be updated.
-       * An attestation by this attestor is stored as a Grafeas
-       * Attestation.Authority Occurrence that names a container image and that
-       * links to this Note. Grafeas is an external dependency.
-       * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearNoteReference() { - - noteReference_ = getDefaultInstance().getNoteReference(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The Grafeas resource name of a Attestation.Authority Note,
-       * created by the user, in the format: `projects/*/notes/*`. This field may
-       * not be updated.
-       * An attestation by this attestor is stored as a Grafeas
-       * Attestation.Authority Occurrence that names a container image and that
-       * links to this Note. Grafeas is an external dependency.
-       * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for noteReference to set. - * @return This builder for chaining. - */ - public Builder setNoteReferenceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - noteReference_ = value; - onChanged(); - return this; - } - - private java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> - publicKeys_ = java.util.Collections.emptyList(); - - private void ensurePublicKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - publicKeys_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey>(publicKeys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder> - publicKeysBuilder_; - - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey> - getPublicKeysList() { - if (publicKeysBuilder_ == null) { - return java.util.Collections.unmodifiableList(publicKeys_); - } else { - return publicKeysBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getPublicKeysCount() { - if (publicKeysBuilder_ == null) { - return publicKeys_.size(); - } else { - return publicKeysBuilder_.getCount(); - } - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - getPublicKeys(int index) { - if (publicKeysBuilder_ == null) { - return publicKeys_.get(index); - } else { - return publicKeysBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublicKeys( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.set(index, value); - onChanged(); - } else { - publicKeysBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublicKeys( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder - builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.set(index, builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.add(value); - onChanged(); - } else { - publicKeysBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.add(index, value); - onChanged(); - } else { - publicKeysBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder - builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.Builder - builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(index, builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllPublicKeys( - java.lang.Iterable< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey> - values) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, publicKeys_); - onChanged(); - } else { - publicKeysBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPublicKeys() { - if (publicKeysBuilder_ == null) { - publicKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - publicKeysBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removePublicKeys(int index) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.remove(index); - onChanged(); - } else { - publicKeysBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder - getPublicKeysBuilder(int index) { - return getPublicKeysFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder - getPublicKeysOrBuilder(int index) { - if (publicKeysBuilder_ == null) { - return publicKeys_.get(index); - } else { - return publicKeysBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder> - getPublicKeysOrBuilderList() { - if (publicKeysBuilder_ != null) { - return publicKeysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(publicKeys_); - } - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder - addPublicKeysBuilder() { - return getPublicKeysFieldBuilder() - .addBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .getDefaultInstance()); - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder - addPublicKeysBuilder(int index) { - return getPublicKeysFieldBuilder() - .addBuilder( - index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .getDefaultInstance()); - } - /** - * - * - *
-       * Optional. Public keys that verify attestations signed by this
-       * attestor.  This field may be updated.
-       * If this field is non-empty, one of the specified public keys must
-       * verify that an attestation was signed by this attestor for the
-       * image specified in the admission request.
-       * If this field is empty, this attestor always returns that no
-       * valid attestations exist.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder> - getPublicKeysBuilderList() { - return getPublicKeysFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder> - getPublicKeysFieldBuilder() { - if (publicKeysBuilder_ == null) { - publicKeysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKeyOrBuilder>( - publicKeys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - publicKeys_ = null; - } - return publicKeysBuilder_; - } - - private java.lang.Object delegationServiceAccountEmail_ = ""; - /** - * - * - *
-       * Output only. This field will contain the service account email address
-       * that this Attestor will use as the principal when querying Container
-       * Analysis. Attestor administrators must grant this service account the
-       * IAM role needed to read attestations from the [note_reference][Note] in
-       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-       * This email address is fixed for the lifetime of the Attestor, but callers
-       * should not make any other assumptions about the service account email;
-       * future versions may use an email based on a different naming pattern.
-       * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - public java.lang.String getDelegationServiceAccountEmail() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - delegationServiceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Output only. This field will contain the service account email address
-       * that this Attestor will use as the principal when querying Container
-       * Analysis. Attestor administrators must grant this service account the
-       * IAM role needed to read attestations from the [note_reference][Note] in
-       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-       * This email address is fixed for the lifetime of the Attestor, but callers
-       * should not make any other assumptions about the service account email;
-       * future versions may use an email based on a different naming pattern.
-       * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - delegationServiceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Output only. This field will contain the service account email address
-       * that this Attestor will use as the principal when querying Container
-       * Analysis. Attestor administrators must grant this service account the
-       * IAM role needed to read attestations from the [note_reference][Note] in
-       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-       * This email address is fixed for the lifetime of the Attestor, but callers
-       * should not make any other assumptions about the service account email;
-       * future versions may use an email based on a different naming pattern.
-       * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The delegationServiceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setDelegationServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - delegationServiceAccountEmail_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. This field will contain the service account email address
-       * that this Attestor will use as the principal when querying Container
-       * Analysis. Attestor administrators must grant this service account the
-       * IAM role needed to read attestations from the [note_reference][Note] in
-       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-       * This email address is fixed for the lifetime of the Attestor, but callers
-       * should not make any other assumptions about the service account email;
-       * future versions may use an email based on a different naming pattern.
-       * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDelegationServiceAccountEmail() { - - delegationServiceAccountEmail_ = getDefaultInstance().getDelegationServiceAccountEmail(); - onChanged(); - return this; - } - /** - * - * - *
-       * Output only. This field will contain the service account email address
-       * that this Attestor will use as the principal when querying Container
-       * Analysis. Attestor administrators must grant this service account the
-       * IAM role needed to read attestations from the [note_reference][Note] in
-       * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-       * This email address is fixed for the lifetime of the Attestor, but callers
-       * should not make any other assumptions about the service account email;
-       * future versions may use an email based on a different naming pattern.
-       * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for delegationServiceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setDelegationServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - delegationServiceAccountEmail_ = 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.binaryauthorization.v1.UserOwnedGrafeasNote) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources - .UserOwnedGrafeasNote - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UserOwnedGrafeasNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.UserOwnedGrafeasNote - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface PkixPublicKeyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.PkixPublicKey) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - java.lang.String getPublicKeyPem(); - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - com.google.protobuf.ByteString getPublicKeyPemBytes(); - - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - int getSignatureAlgorithmValue(); - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.SignatureAlgorithm - getSignatureAlgorithm(); - } - /** - * - * - *
-   * A public key in the PkixPublicKey format (see
-   * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
-   * Public keys of this type are typically textually encoded using the PEM
-   * format.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.PkixPublicKey} - */ - public static final class PkixPublicKey extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.PkixPublicKey) - PkixPublicKeyOrBuilder { - private static final long serialVersionUID = 0L; - // Use PkixPublicKey.newBuilder() to construct. - private PkixPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PkixPublicKey() { - publicKeyPem_ = ""; - signatureAlgorithm_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PkixPublicKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder - .class); - } - - /** - * - * - *
-     * Represents a signature algorithm and other information necessary to verify
-     * signatures with a given public key.
-     * This is based primarily on the public key types supported by Tink's
-     * PemKeyType, which is in turn based on KMS's supported signing algorithms.
-     * See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz
-     * might support additional public key types independently of Tink and/or KMS.
-     * 
- * - * Protobuf enum {@code google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm} - */ - public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Not specified.
-       * 
- * - * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - SIGNATURE_ALGORITHM_UNSPECIFIED(0, 0), - /** - * - * - *
-       * RSASSA-PSS 2048 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_2048_SHA256 = 1; - */ - RSA_PSS_2048_SHA256(1, 1), - /** - * - * - *
-       * RSASSA-PSS 3072 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_3072_SHA256 = 2; - */ - RSA_PSS_3072_SHA256(2, 2), - /** - * - * - *
-       * RSASSA-PSS 4096 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_4096_SHA256 = 3; - */ - RSA_PSS_4096_SHA256(3, 3), - /** - * - * - *
-       * RSASSA-PSS 4096 bit key with a SHA512 digest.
-       * 
- * - * RSA_PSS_4096_SHA512 = 4; - */ - RSA_PSS_4096_SHA512(4, 4), - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - RSA_SIGN_PKCS1_2048_SHA256(5, 5), - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - RSA_SIGN_PKCS1_3072_SHA256(6, 6), - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - RSA_SIGN_PKCS1_4096_SHA256(7, 7), - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
-       * 
- * - * RSA_SIGN_PKCS1_4096_SHA512 = 8; - */ - RSA_SIGN_PKCS1_4096_SHA512(8, 8), - /** - * - * - *
-       * ECDSA on the NIST P-256 curve with a SHA256 digest.
-       * 
- * - * ECDSA_P256_SHA256 = 9; - */ - ECDSA_P256_SHA256(9, 9), - /** - * - * - *
-       * ECDSA on the NIST P-384 curve with a SHA384 digest.
-       * 
- * - * ECDSA_P384_SHA384 = 10; - */ - ECDSA_P384_SHA384(11, 10), - /** - * - * - *
-       * ECDSA on the NIST P-521 curve with a SHA512 digest.
-       * 
- * - * ECDSA_P521_SHA512 = 11; - */ - ECDSA_P521_SHA512(13, 11), - UNRECOGNIZED(-1, -1), - ; - - /** - * - * - *
-       * ECDSA on the NIST P-256 curve with a SHA256 digest.
-       * 
- * - * EC_SIGN_P256_SHA256 = 9; - */ - public static final SignatureAlgorithm EC_SIGN_P256_SHA256 = ECDSA_P256_SHA256; - /** - * - * - *
-       * ECDSA on the NIST P-384 curve with a SHA384 digest.
-       * 
- * - * EC_SIGN_P384_SHA384 = 10; - */ - public static final SignatureAlgorithm EC_SIGN_P384_SHA384 = ECDSA_P384_SHA384; - /** - * - * - *
-       * ECDSA on the NIST P-521 curve with a SHA512 digest.
-       * 
- * - * EC_SIGN_P521_SHA512 = 11; - */ - public static final SignatureAlgorithm EC_SIGN_P521_SHA512 = ECDSA_P521_SHA512; - /** - * - * - *
-       * Not specified.
-       * 
- * - * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - public static final int SIGNATURE_ALGORITHM_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * RSASSA-PSS 2048 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_2048_SHA256 = 1; - */ - public static final int RSA_PSS_2048_SHA256_VALUE = 1; - /** - * - * - *
-       * RSASSA-PSS 3072 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_3072_SHA256 = 2; - */ - public static final int RSA_PSS_3072_SHA256_VALUE = 2; - /** - * - * - *
-       * RSASSA-PSS 4096 bit key with a SHA256 digest.
-       * 
- * - * RSA_PSS_4096_SHA256 = 3; - */ - public static final int RSA_PSS_4096_SHA256_VALUE = 3; - /** - * - * - *
-       * RSASSA-PSS 4096 bit key with a SHA512 digest.
-       * 
- * - * RSA_PSS_4096_SHA512 = 4; - */ - public static final int RSA_PSS_4096_SHA512_VALUE = 4; - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - public static final int RSA_SIGN_PKCS1_2048_SHA256_VALUE = 5; - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - public static final int RSA_SIGN_PKCS1_3072_SHA256_VALUE = 6; - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
-       * 
- * - * RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - public static final int RSA_SIGN_PKCS1_4096_SHA256_VALUE = 7; - /** - * - * - *
-       * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
-       * 
- * - * RSA_SIGN_PKCS1_4096_SHA512 = 8; - */ - public static final int RSA_SIGN_PKCS1_4096_SHA512_VALUE = 8; - /** - * - * - *
-       * ECDSA on the NIST P-256 curve with a SHA256 digest.
-       * 
- * - * ECDSA_P256_SHA256 = 9; - */ - public static final int ECDSA_P256_SHA256_VALUE = 9; - /** - * - * - *
-       * ECDSA on the NIST P-256 curve with a SHA256 digest.
-       * 
- * - * EC_SIGN_P256_SHA256 = 9; - */ - public static final int EC_SIGN_P256_SHA256_VALUE = 9; - /** - * - * - *
-       * ECDSA on the NIST P-384 curve with a SHA384 digest.
-       * 
- * - * ECDSA_P384_SHA384 = 10; - */ - public static final int ECDSA_P384_SHA384_VALUE = 10; - /** - * - * - *
-       * ECDSA on the NIST P-384 curve with a SHA384 digest.
-       * 
- * - * EC_SIGN_P384_SHA384 = 10; - */ - public static final int EC_SIGN_P384_SHA384_VALUE = 10; - /** - * - * - *
-       * ECDSA on the NIST P-521 curve with a SHA512 digest.
-       * 
- * - * ECDSA_P521_SHA512 = 11; - */ - public static final int ECDSA_P521_SHA512_VALUE = 11; - /** - * - * - *
-       * ECDSA on the NIST P-521 curve with a SHA512 digest.
-       * 
- * - * EC_SIGN_P521_SHA512 = 11; - */ - public static final int EC_SIGN_P521_SHA512_VALUE = 11; - - public final int getNumber() { - if (index == -1) { - 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 SignatureAlgorithm 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 SignatureAlgorithm forNumber(int value) { - switch (value) { - case 0: - return SIGNATURE_ALGORITHM_UNSPECIFIED; - case 1: - return RSA_PSS_2048_SHA256; - case 2: - return RSA_PSS_3072_SHA256; - case 3: - return RSA_PSS_4096_SHA256; - case 4: - return RSA_PSS_4096_SHA512; - case 5: - return RSA_SIGN_PKCS1_2048_SHA256; - case 6: - return RSA_SIGN_PKCS1_3072_SHA256; - case 7: - return RSA_SIGN_PKCS1_4096_SHA256; - case 8: - return RSA_SIGN_PKCS1_4096_SHA512; - case 9: - return ECDSA_P256_SHA256; - case 10: - return ECDSA_P384_SHA384; - case 11: - return ECDSA_P521_SHA512; - 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 SignatureAlgorithm findValueByNumber(int number) { - return SignatureAlgorithm.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (index == -1) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(index); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final SignatureAlgorithm[] VALUES = getStaticValuesArray(); - - private static SignatureAlgorithm[] getStaticValuesArray() { - return new SignatureAlgorithm[] { - SIGNATURE_ALGORITHM_UNSPECIFIED, - RSA_PSS_2048_SHA256, - RSA_PSS_3072_SHA256, - RSA_PSS_4096_SHA256, - RSA_PSS_4096_SHA512, - RSA_SIGN_PKCS1_2048_SHA256, - RSA_SIGN_PKCS1_3072_SHA256, - RSA_SIGN_PKCS1_4096_SHA256, - RSA_SIGN_PKCS1_4096_SHA512, - ECDSA_P256_SHA256, - EC_SIGN_P256_SHA256, - ECDSA_P384_SHA384, - EC_SIGN_P384_SHA384, - ECDSA_P521_SHA512, - EC_SIGN_P521_SHA512, - }; - } - - public static SignatureAlgorithm 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 index; - private final int value; - - private SignatureAlgorithm(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm) - } - - public static final int PUBLIC_KEY_PEM_FIELD_NUMBER = 1; - private volatile java.lang.Object publicKeyPem_; - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - @java.lang.Override - public java.lang.String getPublicKeyPem() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyPem_ = s; - return s; - } - } - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPublicKeyPemBytes() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - publicKeyPem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURE_ALGORITHM_FIELD_NUMBER = 2; - private int signatureAlgorithm_; - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - @java.lang.Override - public int getSignatureAlgorithmValue() { - return signatureAlgorithm_; - } - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm - getSignatureAlgorithm() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.valueOf(signatureAlgorithm_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKeyPem_); - } - if (signatureAlgorithm_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.SIGNATURE_ALGORITHM_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, signatureAlgorithm_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKeyPem_); - } - if (signatureAlgorithm_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.SIGNATURE_ALGORITHM_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, signatureAlgorithm_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) obj; - - if (!getPublicKeyPem().equals(other.getPublicKeyPem())) return false; - if (signatureAlgorithm_ != other.signatureAlgorithm_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PUBLIC_KEY_PEM_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeyPem().hashCode(); - hash = (37 * hash) + SIGNATURE_ALGORITHM_FIELD_NUMBER; - hash = (53 * hash) + signatureAlgorithm_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 public key in the PkixPublicKey format (see
-     * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
-     * Public keys of this type are typically textually encoded using the PEM
-     * format.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.PkixPublicKey} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.PkixPublicKey) - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - publicKeyPem_ = ""; - - signatureAlgorithm_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey(this); - result.publicKeyPem_ = publicKeyPem_; - result.signatureAlgorithm_ = signatureAlgorithm_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance()) return this; - if (!other.getPublicKeyPem().isEmpty()) { - publicKeyPem_ = other.publicKeyPem_; - onChanged(); - } - if (other.signatureAlgorithm_ != 0) { - setSignatureAlgorithmValue(other.getSignatureAlgorithmValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - publicKeyPem_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - signatureAlgorithm_ = input.readEnum(); - - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object publicKeyPem_ = ""; - /** - * - * - *
-       * A PEM-encoded public key, as described in
-       * https://tools.ietf.org/html/rfc7468#section-13
-       * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - public java.lang.String getPublicKeyPem() { - java.lang.Object ref = publicKeyPem_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyPem_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A PEM-encoded public key, as described in
-       * https://tools.ietf.org/html/rfc7468#section-13
-       * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - public com.google.protobuf.ByteString getPublicKeyPemBytes() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - publicKeyPem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A PEM-encoded public key, as described in
-       * https://tools.ietf.org/html/rfc7468#section-13
-       * 
- * - * string public_key_pem = 1; - * - * @param value The publicKeyPem to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyPem(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKeyPem_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * A PEM-encoded public key, as described in
-       * https://tools.ietf.org/html/rfc7468#section-13
-       * 
- * - * string public_key_pem = 1; - * - * @return This builder for chaining. - */ - public Builder clearPublicKeyPem() { - - publicKeyPem_ = getDefaultInstance().getPublicKeyPem(); - onChanged(); - return this; - } - /** - * - * - *
-       * A PEM-encoded public key, as described in
-       * https://tools.ietf.org/html/rfc7468#section-13
-       * 
- * - * string public_key_pem = 1; - * - * @param value The bytes for publicKeyPem to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyPemBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKeyPem_ = value; - onChanged(); - return this; - } - - private int signatureAlgorithm_ = 0; - /** - * - * - *
-       * The signature algorithm used to verify a message against a signature using
-       * this key.
-       * These signature algorithm must match the structure and any object
-       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-       * that of the public key).
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - @java.lang.Override - public int getSignatureAlgorithmValue() { - return signatureAlgorithm_; - } - /** - * - * - *
-       * The signature algorithm used to verify a message against a signature using
-       * this key.
-       * These signature algorithm must match the structure and any object
-       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-       * that of the public key).
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @param value The enum numeric value on the wire for signatureAlgorithm to set. - * @return This builder for chaining. - */ - public Builder setSignatureAlgorithmValue(int value) { - - signatureAlgorithm_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The signature algorithm used to verify a message against a signature using
-       * this key.
-       * These signature algorithm must match the structure and any object
-       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-       * that of the public key).
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm - getSignatureAlgorithm() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm - result = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.valueOf(signatureAlgorithm_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The signature algorithm used to verify a message against a signature using
-       * this key.
-       * These signature algorithm must match the structure and any object
-       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-       * that of the public key).
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @param value The signatureAlgorithm to set. - * @return This builder for chaining. - */ - public Builder setSignatureAlgorithm( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .SignatureAlgorithm - value) { - if (value == null) { - throw new NullPointerException(); - } - - signatureAlgorithm_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The signature algorithm used to verify a message against a signature using
-       * this key.
-       * These signature algorithm must match the structure and any object
-       * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-       * that of the public key).
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearSignatureAlgorithm() { - - signatureAlgorithm_ = 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.binaryauthorization.v1.PkixPublicKey) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.PkixPublicKey) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKey - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PkixPublicKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface AttestorPublicKeyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.AttestorPublicKey) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - java.lang.String getComment(); - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - com.google.protobuf.ByteString getCommentBytes(); - - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - boolean hasAsciiArmoredPgpPublicKey(); - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - java.lang.String getAsciiArmoredPgpPublicKey(); - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes(); - - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - boolean hasPkixPublicKey(); - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getPkixPublicKey(); - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder - getPkixPublicKeyOrBuilder(); - - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .PublicKeyCase - getPublicKeyCase(); - } - /** - * - * - *
-   * An [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify
-   * attestations signed by this attestor.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AttestorPublicKey} - */ - public static final class AttestorPublicKey extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.AttestorPublicKey) - AttestorPublicKeyOrBuilder { - private static final long serialVersionUID = 0L; - // Use AttestorPublicKey.newBuilder() to construct. - private AttestorPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AttestorPublicKey() { - comment_ = ""; - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AttestorPublicKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder.class); - } - - private int publicKeyCase_ = 0; - private java.lang.Object publicKey_; - - public enum PublicKeyCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ASCII_ARMORED_PGP_PUBLIC_KEY(3), - PKIX_PUBLIC_KEY(5), - PUBLICKEY_NOT_SET(0); - private final int value; - - private PublicKeyCase(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 PublicKeyCase valueOf(int value) { - return forNumber(value); - } - - public static PublicKeyCase forNumber(int value) { - switch (value) { - case 3: - return ASCII_ARMORED_PGP_PUBLIC_KEY; - case 5: - return PKIX_PUBLIC_KEY; - case 0: - return PUBLICKEY_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PublicKeyCase getPublicKeyCase() { - return PublicKeyCase.forNumber(publicKeyCase_); - } - - public static final int COMMENT_FIELD_NUMBER = 1; - private volatile java.lang.Object comment_; - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - @java.lang.Override - public java.lang.String getComment() { - java.lang.Object ref = comment_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comment_ = s; - return s; - } - } - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCommentBytes() { - java.lang.Object ref = comment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - comment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 2; - private volatile java.lang.Object id_; - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER = 3; - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - public boolean hasAsciiArmoredPgpPublicKey() { - return publicKeyCase_ == 3; - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - public java.lang.String getAsciiArmoredPgpPublicKey() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof java.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 (publicKeyCase_ == 3) { - publicKey_ = s; - } - return s; - } - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (publicKeyCase_ == 3) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PKIX_PUBLIC_KEY_FIELD_NUMBER = 5; - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - @java.lang.Override - public boolean hasPkixPublicKey() { - return publicKeyCase_ == 5; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getPkixPublicKey() { - if (publicKeyCase_ == 5) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder - getPkixPublicKeyOrBuilder() { - if (publicKeyCase_ == 5) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, comment_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - if (publicKeyCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); - } - if (publicKeyCase_ == 5) { - output.writeMessage( - 5, - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, comment_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - if (publicKeyCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); - } - if (publicKeyCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey other = - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) obj; - - if (!getComment().equals(other.getComment())) return false; - if (!getId().equals(other.getId())) return false; - if (!getPublicKeyCase().equals(other.getPublicKeyCase())) return false; - switch (publicKeyCase_) { - case 3: - if (!getAsciiArmoredPgpPublicKey().equals(other.getAsciiArmoredPgpPublicKey())) - return false; - break; - case 5: - if (!getPkixPublicKey().equals(other.getPkixPublicKey())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + COMMENT_FIELD_NUMBER; - hash = (53 * hash) + getComment().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - switch (publicKeyCase_) { - case 3: - hash = (37 * hash) + ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getAsciiArmoredPgpPublicKey().hashCode(); - break; - case 5: - hash = (37 * hash) + PKIX_PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPkixPublicKey().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify
-     * attestations signed by this attestor.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.AttestorPublicKey} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.AttestorPublicKey) - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - comment_ = ""; - - id_ = ""; - - if (pkixPublicKeyBuilder_ != null) { - pkixPublicKeyBuilder_.clear(); - } - publicKeyCase_ = 0; - publicKey_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources - .internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey result = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey( - this); - result.comment_ = comment_; - result.id_ = id_; - if (publicKeyCase_ == 3) { - result.publicKey_ = publicKey_; - } - if (publicKeyCase_ == 5) { - if (pkixPublicKeyBuilder_ == null) { - result.publicKey_ = publicKey_; - } else { - result.publicKey_ = pkixPublicKeyBuilder_.build(); - } - } - result.publicKeyCase_ = publicKeyCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - .getDefaultInstance()) return this; - if (!other.getComment().isEmpty()) { - comment_ = other.comment_; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - switch (other.getPublicKeyCase()) { - case ASCII_ARMORED_PGP_PUBLIC_KEY: - { - publicKeyCase_ = 3; - publicKey_ = other.publicKey_; - onChanged(); - break; - } - case PKIX_PUBLIC_KEY: - { - mergePkixPublicKey(other.getPkixPublicKey()); - break; - } - case PUBLICKEY_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - comment_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - id_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 3; - publicKey_ = s; - break; - } // case 26 - case 42: - { - input.readMessage(getPkixPublicKeyFieldBuilder().getBuilder(), extensionRegistry); - publicKeyCase_ = 5; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int publicKeyCase_ = 0; - private java.lang.Object publicKey_; - - public PublicKeyCase getPublicKeyCase() { - return PublicKeyCase.forNumber(publicKeyCase_); - } - - public Builder clearPublicKey() { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - return this; - } - - private java.lang.Object comment_ = ""; - /** - * - * - *
-       * Optional. A descriptive comment. This field may be updated.
-       * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - public java.lang.String getComment() { - java.lang.Object ref = comment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment. This field may be updated.
-       * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - public com.google.protobuf.ByteString getCommentBytes() { - java.lang.Object ref = comment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - comment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Optional. A descriptive comment. This field may be updated.
-       * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The comment to set. - * @return This builder for chaining. - */ - public Builder setComment(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - comment_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment. This field may be updated.
-       * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearComment() { - - comment_ = getDefaultInstance().getComment(); - onChanged(); - return this; - } - /** - * - * - *
-       * Optional. A descriptive comment. This field may be updated.
-       * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for comment to set. - * @return This builder for chaining. - */ - public Builder setCommentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - comment_ = value; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - * - * - *
-       * The ID of this public key.
-       * Signatures verified by BinAuthz must include the ID of the public key that
-       * can be used to verify them, and that ID must match the contents of this
-       * field exactly.
-       * Additional restrictions on this field can be imposed based on which public
-       * key type is encapsulated. See the documentation on `public_key` cases below
-       * for details.
-       * 
- * - * string id = 2; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The ID of this public key.
-       * Signatures verified by BinAuthz must include the ID of the public key that
-       * can be used to verify them, and that ID must match the contents of this
-       * field exactly.
-       * Additional restrictions on this field can be imposed based on which public
-       * key type is encapsulated. See the documentation on `public_key` cases below
-       * for details.
-       * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The ID of this public key.
-       * Signatures verified by BinAuthz must include the ID of the public key that
-       * can be used to verify them, and that ID must match the contents of this
-       * field exactly.
-       * Additional restrictions on this field can be imposed based on which public
-       * key type is encapsulated. See the documentation on `public_key` cases below
-       * for details.
-       * 
- * - * string id = 2; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The ID of this public key.
-       * Signatures verified by BinAuthz must include the ID of the public key that
-       * can be used to verify them, and that ID must match the contents of this
-       * field exactly.
-       * Additional restrictions on this field can be imposed based on which public
-       * key type is encapsulated. See the documentation on `public_key` cases below
-       * for details.
-       * 
- * - * string id = 2; - * - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * - * - *
-       * The ID of this public key.
-       * Signatures verified by BinAuthz must include the ID of the public key that
-       * can be used to verify them, and that ID must match the contents of this
-       * field exactly.
-       * Additional restrictions on this field can be imposed based on which public
-       * key type is encapsulated. See the documentation on `public_key` cases below
-       * for details.
-       * 
- * - * string id = 2; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - @java.lang.Override - public boolean hasAsciiArmoredPgpPublicKey() { - return publicKeyCase_ == 3; - } - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - @java.lang.Override - public java.lang.String getAsciiArmoredPgpPublicKey() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 3) { - publicKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (publicKeyCase_ == 3) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @param value The asciiArmoredPgpPublicKey to set. - * @return This builder for chaining. - */ - public Builder setAsciiArmoredPgpPublicKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - publicKeyCase_ = 3; - publicKey_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return This builder for chaining. - */ - public Builder clearAsciiArmoredPgpPublicKey() { - if (publicKeyCase_ == 3) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-       * ASCII-armored representation of a PGP public key, as the entire output by
-       * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-       * line endings).
-       * When using this field, `id` should be left blank.  The BinAuthz API
-       * handlers will calculate the ID and fill it in automatically.  BinAuthz
-       * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-       * upper-case hex.  If `id` is provided by the caller, it will be
-       * overwritten by the API-calculated ID.
-       * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @param value The bytes for asciiArmoredPgpPublicKey to set. - * @return This builder for chaining. - */ - public Builder setAsciiArmoredPgpPublicKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - publicKeyCase_ = 3; - publicKey_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKeyOrBuilder> - pkixPublicKeyBuilder_; - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - @java.lang.Override - public boolean hasPkixPublicKey() { - return publicKeyCase_ == 5; - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - getPkixPublicKey() { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } else { - if (publicKeyCase_ == 5) { - return pkixPublicKeyBuilder_.getMessage(); - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - public Builder setPkixPublicKey( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey value) { - if (pkixPublicKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicKey_ = value; - onChanged(); - } else { - pkixPublicKeyBuilder_.setMessage(value); - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - public Builder setPkixPublicKey( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder - builderForValue) { - if (pkixPublicKeyBuilder_ == null) { - publicKey_ = builderForValue.build(); - onChanged(); - } else { - pkixPublicKeyBuilder_.setMessage(builderForValue.build()); - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - public Builder mergePkixPublicKey( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey value) { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5 - && publicKey_ - != com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance()) { - publicKey_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .newBuilder( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKey) - publicKey_) - .mergeFrom(value) - .buildPartial(); - } else { - publicKey_ = value; - } - onChanged(); - } else { - if (publicKeyCase_ == 5) { - pkixPublicKeyBuilder_.mergeFrom(value); - } else { - pkixPublicKeyBuilder_.setMessage(value); - } - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - public Builder clearPkixPublicKey() { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - } else { - if (publicKeyCase_ == 5) { - publicKeyCase_ = 0; - publicKey_ = null; - } - pkixPublicKeyBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder - getPkixPublicKeyBuilder() { - return getPkixPublicKeyFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKeyOrBuilder - getPkixPublicKeyOrBuilder() { - if ((publicKeyCase_ == 5) && (pkixPublicKeyBuilder_ != null)) { - return pkixPublicKeyBuilder_.getMessageOrBuilder(); - } else { - if (publicKeyCase_ == 5) { - return (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_; - } - return com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } - } - /** - * - * - *
-       * A raw PKIX SubjectPublicKeyInfo format public key.
-       * NOTE: `id` may be explicitly provided by the caller when using this
-       * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-       * blank, a default one will be computed based on the digest of the DER
-       * encoding of the public key.
-       * 
- * - * .google.cloud.binaryauthorization.v1.PkixPublicKey pkix_public_key = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKeyOrBuilder> - getPkixPublicKeyFieldBuilder() { - if (pkixPublicKeyBuilder_ == null) { - if (!(publicKeyCase_ == 5)) { - publicKey_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .getDefaultInstance(); - } - pkixPublicKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey - .Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .PkixPublicKeyOrBuilder>( - (com.google.protos.google.cloud.binaryauthorization.v1.Resources.PkixPublicKey) - publicKey_, - getParentForChildren(), - isClean()); - publicKey_ = null; - } - publicKeyCase_ = 5; - onChanged(); - ; - return pkixPublicKeyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.AttestorPublicKey) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.AttestorPublicKey) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorPublicKey - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestorPublicKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorPublicKey - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_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/binaryauthorization/v1/re" - + "sources.proto\022#google.cloud.binaryauthor" - + "ization.v1\032\037google/api/field_behavior.pr" - + "oto\032\031google/api/resource.proto\032\037google/p" - + "rotobuf/timestamp.proto\"\370\014\n\006Policy\022\021\n\004na" - + "me\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006 \001(\tB\003\340A\001\022" - + "r\n\035global_policy_evaluation_mode\030\007 \001(\0162F" - + ".google.cloud.binaryauthorization.v1.Pol" - + "icy.GlobalPolicyEvaluationModeB\003\340A\001\022i\n\034a" - + "dmission_whitelist_patterns\030\002 \003(\0132>.goog" - + "le.cloud.binaryauthorization.v1.Admissio" - + "nWhitelistPatternB\003\340A\001\022l\n\027cluster_admiss" - + "ion_rules\030\003 \003(\0132F.google.cloud.binaryaut" - + "horization.v1.Policy.ClusterAdmissionRul" - + "esEntryB\003\340A\001\022\205\001\n$kubernetes_namespace_ad" - + "mission_rules\030\n \003(\0132R.google.cloud.binar" - + "yauthorization.v1.Policy.KubernetesNames" - + "paceAdmissionRulesEntryB\003\340A\001\022\220\001\n*kuberne" - + "tes_service_account_admission_rules\030\010 \003(" - + "\0132W.google.cloud.binaryauthorization.v1." - + "Policy.KubernetesServiceAccountAdmission" - + "RulesEntryB\003\340A\001\022\210\001\n&istio_service_identi" - + "ty_admission_rules\030\t \003(\0132S.google.cloud." - + "binaryauthorization.v1.Policy.IstioServi" - + "ceIdentityAdmissionRulesEntryB\003\340A\001\022W\n\026de" - + "fault_admission_rule\030\004 \001(\01322.google.clou" - + "d.binaryauthorization.v1.AdmissionRuleB\003" - + "\340A\002\0224\n\013update_time\030\005 \001(\0132\032.google.protob" - + "uf.TimestampB\003\340A\003\032p\n\032ClusterAdmissionRul" - + "esEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(\01322.go" - + "ogle.cloud.binaryauthorization.v1.Admiss" - + "ionRule:\0028\001\032|\n&KubernetesNamespaceAdmiss" - + "ionRulesEntry\022\013\n\003key\030\001 \001(\t\022A\n\005value\030\002 \001(" - + "\01322.google.cloud.binaryauthorization.v1." - + "AdmissionRule:\0028\001\032\201\001\n+KubernetesServiceA" - + "ccountAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022A" - + "\n\005value\030\002 \001(\01322.google.cloud.binaryautho" - + "rization.v1.AdmissionRule:\0028\001\032}\n\'IstioSe" - + "rviceIdentityAdmissionRulesEntry\022\013\n\003key\030" - + "\001 \001(\t\022A\n\005value\030\002 \001(\01322.google.cloud.bina" - + "ryauthorization.v1.AdmissionRule:\0028\001\"d\n\032" - + "GlobalPolicyEvaluationMode\022-\n)GLOBAL_POL" - + "ICY_EVALUATION_MODE_UNSPECIFIED\020\000\022\n\n\006ENA" - + "BLE\020\001\022\013\n\007DISABLE\020\002:f\352Ac\n)binaryauthoriza" - + "tion.googleapis.com/Policy\022\031projects/{pr" - + "oject}/policy\022\033locations/{location}/poli" - + "cy\"1\n\031AdmissionWhitelistPattern\022\024\n\014name_" - + "pattern\030\001 \001(\t\"\332\003\n\rAdmissionRule\022_\n\017evalu" - + "ation_mode\030\001 \001(\0162A.google.cloud.binaryau" - + "thorization.v1.AdmissionRule.EvaluationM" - + "odeB\003\340A\002\022$\n\027require_attestations_by\030\002 \003(" - + "\tB\003\340A\001\022a\n\020enforcement_mode\030\003 \001(\0162B.googl" - + "e.cloud.binaryauthorization.v1.Admission" - + "Rule.EnforcementModeB\003\340A\002\"m\n\016EvaluationM" - + "ode\022\037\n\033EVALUATION_MODE_UNSPECIFIED\020\000\022\020\n\014" - + "ALWAYS_ALLOW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022" - + "\017\n\013ALWAYS_DENY\020\003\"p\n\017EnforcementMode\022 \n\034E" - + "NFORCEMENT_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCE" - + "D_BLOCK_AND_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_" - + "LOG_ONLY\020\002\"\267\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340" - + "A\002\022\030\n\013description\030\006 \001(\tB\003\340A\001\022\\\n\027user_own" - + "ed_grafeas_note\030\003 \001(\01329.google.cloud.bin" - + "aryauthorization.v1.UserOwnedGrafeasNote" - + "H\000\0224\n\013update_time\030\004 \001(\0132\032.google.protobu" - + "f.TimestampB\003\340A\003:Y\352AV\n+binaryauthorizati" - + "on.googleapis.com/Attestor\022\'projects/{pr" - + "oject}/attestors/{attestor}B\017\n\rattestor_" - + "type\"\264\001\n\024UserOwnedGrafeasNote\022\033\n\016note_re" - + "ference\030\001 \001(\tB\003\340A\002\022P\n\013public_keys\030\002 \003(\0132" - + "6.google.cloud.binaryauthorization.v1.At" - + "testorPublicKeyB\003\340A\001\022-\n delegation_servi" - + "ce_account_email\030\003 \001(\tB\003\340A\003\"\277\004\n\rPkixPubl" - + "icKey\022\026\n\016public_key_pem\030\001 \001(\t\022b\n\023signatu" - + "re_algorithm\030\002 \001(\0162E.google.cloud.binary" - + "authorization.v1.PkixPublicKey.Signature" - + "Algorithm\"\261\003\n\022SignatureAlgorithm\022#\n\037SIGN" - + "ATURE_ALGORITHM_UNSPECIFIED\020\000\022\027\n\023RSA_PSS" - + "_2048_SHA256\020\001\022\027\n\023RSA_PSS_3072_SHA256\020\002\022" - + "\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023RSA_PSS_4096" - + "_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_2048_SHA256\020" - + "\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA256\020\006\022\036\n\032RSA" - + "_SIGN_PKCS1_4096_SHA256\020\007\022\036\n\032RSA_SIGN_PK" - + "CS1_4096_SHA512\020\010\022\025\n\021ECDSA_P256_SHA256\020\t" - + "\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n\021ECDSA_P384_" - + "SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA384\020\n\022\025\n\021ECD" - + "SA_P521_SHA512\020\013\022\027\n\023EC_SIGN_P521_SHA512\020" - + "\013\032\002\020\001\"\272\001\n\021AttestorPublicKey\022\024\n\007comment\030\001" - + " \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034ascii_armored_p" - + "gp_public_key\030\003 \001(\tH\000\022M\n\017pkix_public_key" - + "\030\005 \001(\01322.google.cloud.binaryauthorizatio" - + "n.v1.PkixPublicKeyH\000B\014\n\npublic_keyB\211\002\n5c" - + "om.google.protos.google.cloud.binaryauth" - + "orization.v1P\000ZVgoogle.golang.org/genpro" - + "to/googleapis/cloud/binaryauthorization/" - + "v1;binaryauthorization\370\001\001\252\002#Google.Cloud" - + ".BinaryAuthorization.V1\312\002#Google\\Cloud\\B" - + "inaryAuthorization\\V1\352\002&Google::Cloud::B" - + "inaryAuthorization::V1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_binaryauthorization_v1_Policy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor, - new java.lang.String[] { - "Name", - "Description", - "GlobalPolicyEvaluationMode", - "AdmissionWhitelistPatterns", - "ClusterAdmissionRules", - "KubernetesNamespaceAdmissionRules", - "KubernetesServiceAccountAdmissionRules", - "IstioServiceIdentityAdmissionRules", - "DefaultAdmissionRule", - "UpdateTime", - }); - internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Policy_ClusterAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1_Policy_descriptor - .getNestedTypes() - .get(3); - internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_AdmissionWhitelistPattern_descriptor, - new java.lang.String[] { - "NamePattern", - }); - internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_AdmissionRule_descriptor, - new java.lang.String[] { - "EvaluationMode", "RequireAttestationsBy", "EnforcementMode", - }); - internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_binaryauthorization_v1_Attestor_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_Attestor_descriptor, - new java.lang.String[] { - "Name", "Description", "UserOwnedGrafeasNote", "UpdateTime", "AttestorType", - }); - internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_UserOwnedGrafeasNote_descriptor, - new java.lang.String[] { - "NoteReference", "PublicKeys", "DelegationServiceAccountEmail", - }); - internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_PkixPublicKey_descriptor, - new java.lang.String[] { - "PublicKeyPem", "SignatureAlgorithm", - }); - internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_AttestorPublicKey_descriptor, - new java.lang.String[] { - "Comment", "Id", "AsciiArmoredPgpPublicKey", "PkixPublicKey", "PublicKey", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java b/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java deleted file mode 100644 index a62557cd..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/java/com/google/protos/google/cloud/binaryauthorization/v1/Service.java +++ /dev/null @@ -1,10969 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1/service.proto - -package com.google.protos.google.cloud.binaryauthorization.v1; - -public final class Service { - private Service() {} - - 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 GetPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.GetPolicy][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetPolicyRequest} - */ - public static final class GetPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetPolicyRequest) - GetPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPolicyRequest.newBuilder() to construct. - private GetPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.Builder - .class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.GetPolicy][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetPolicyRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetPolicyRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest( - 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.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-       * in the format `projects/*/policy`.
-       * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-       * in the format `projects/*/policy`.
-       * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-       * in the format `projects/*/policy`.
-       * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-       * in the format `projects/*/policy`.
-       * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve,
-       * in the format `projects/*/policy`.
-       * 
- * - * - * 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.binaryauthorization.v1.GetPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetPolicyRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UpdatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy(); - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder - getPolicyOrBuilder(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.UpdatePolicy][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdatePolicyRequest} - */ - public static final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) - UpdatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdatePolicyRequest.newBuilder() to construct. - private UpdatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdatePolicyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy policy_; - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy() { - return policy_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance() - : policy_; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder - getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policy_ != null) { - output.writeMessage(1, getPolicy()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) obj; - - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.UpdatePolicy][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdatePolicyRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest( - this); - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - .getDefaultInstance()) return this; - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder - builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.newBuilder( - policy_) - .mergeFrom(value) - .buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder - getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder - getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy - .getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-       * Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will
-       * overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in
-       * the request URL, in the format `projects/*/policy`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Policy.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.PolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UpdatePolicyRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdatePolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdatePolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface CreateAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.CreateAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - java.lang.String getAttestorId(); - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - com.google.protobuf.ByteString getAttestorIdBytes(); - - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - boolean hasAttestor(); - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor(); - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.CreateAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.CreateAttestorRequest} - */ - public static final class CreateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.CreateAttestorRequest) - CreateAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateAttestorRequest.newBuilder() to construct. - private CreateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateAttestorRequest() { - parent_ = ""; - attestorId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * - * 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 ATTESTOR_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object attestorId_; - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - @java.lang.Override - public java.lang.String getAttestorId() { - java.lang.Object ref = attestorId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestorId_ = s; - return s; - } - } - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAttestorIdBytes() { - java.lang.Object ref = attestorId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestorId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTESTOR_FIELD_NUMBER = 3; - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - @java.lang.Override - public boolean hasAttestor() { - return attestor_ != null; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor() { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder() { - return getAttestor(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attestorId_); - } - if (attestor_ != null) { - output.writeMessage(3, getAttestor()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attestorId_); - } - if (attestor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttestor()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getAttestorId().equals(other.getAttestorId())) return false; - if (hasAttestor() != other.hasAttestor()) return false; - if (hasAttestor()) { - if (!getAttestor().equals(other.getAttestor())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ATTESTOR_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttestorId().hashCode(); - if (hasAttestor()) { - hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; - hash = (53 * hash) + getAttestor().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.CreateAttestor][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.CreateAttestorRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.CreateAttestorRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - attestorId_ = ""; - - if (attestorBuilder_ == null) { - attestor_ = null; - } else { - attestor_ = null; - attestorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest( - this); - result.parent_ = parent_; - result.attestorId_ = attestorId_; - if (attestorBuilder_ == null) { - result.attestor_ = attestor_; - } else { - result.attestor_ = attestorBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getAttestorId().isEmpty()) { - attestorId_ = other.attestorId_; - onChanged(); - } - if (other.hasAttestor()) { - mergeAttestor(other.getAttestor()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - attestorId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-       * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * - * 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 attestorId_ = ""; - /** - * - * - *
-       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-       * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - public java.lang.String getAttestorId() { - java.lang.Object ref = attestorId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestorId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-       * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - public com.google.protobuf.ByteString getAttestorIdBytes() { - java.lang.Object ref = attestorId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestorId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-       * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The attestorId to set. - * @return This builder for chaining. - */ - public Builder setAttestorId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attestorId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-       * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAttestorId() { - - attestorId_ = getDefaultInstance().getAttestorId(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID.
-       * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for attestorId to set. - * @return This builder for chaining. - */ - public Builder setAttestorIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attestorId_ = value; - onChanged(); - return this; - } - - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - attestorBuilder_; - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - public boolean hasAttestor() { - return attestorBuilder_ != null || attestor_ != null; - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - getAttestor() { - if (attestorBuilder_ == null) { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } else { - return attestorBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestor_ = value; - onChanged(); - } else { - attestorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - builderForValue) { - if (attestorBuilder_ == null) { - attestor_ = builderForValue.build(); - onChanged(); - } else { - attestorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorBuilder_ == null) { - if (attestor_ != null) { - attestor_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder( - attestor_) - .mergeFrom(value) - .buildPartial(); - } else { - attestor_ = value; - } - onChanged(); - } else { - attestorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearAttestor() { - if (attestorBuilder_ == null) { - attestor_ = null; - onChanged(); - } else { - attestor_ = null; - attestorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - getAttestorBuilder() { - - onChanged(); - return getAttestorFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder() { - if (attestorBuilder_ != null) { - return attestorBuilder_.getMessageOrBuilder(); - } else { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } - } - /** - * - * - *
-       * Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name,
-       * in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorFieldBuilder() { - if (attestorBuilder_ == null) { - attestorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorOrBuilder>(getAttestor(), getParentForChildren(), isClean()); - attestor_ = null; - } - return attestorBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.CreateAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.CreateAttestorRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .CreateAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.CreateAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface GetAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.GetAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetAttestorRequest} - */ - public static final class GetAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetAttestorRequest) - GetAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAttestorRequest.newBuilder() to construct. - private GetAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetAttestorRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.GetAttestor][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetAttestorRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetAttestorRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest( - 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.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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.binaryauthorization.v1.GetAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetAttestorRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UpdateAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - boolean hasAttestor(); - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor(); - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.UpdateAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdateAttestorRequest} - */ - public static final class UpdateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) - UpdateAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateAttestorRequest.newBuilder() to construct. - private UpdateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateAttestorRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .Builder.class); - } - - public static final int ATTESTOR_FIELD_NUMBER = 1; - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - @java.lang.Override - public boolean hasAttestor() { - return attestor_ != null; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestor() { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder() { - return getAttestor(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (attestor_ != null) { - output.writeMessage(1, getAttestor()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (attestor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAttestor()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) obj; - - if (hasAttestor() != other.hasAttestor()) return false; - if (hasAttestor()) { - if (!getAttestor().equals(other.getAttestor())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttestor()) { - hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; - hash = (53 * hash) + getAttestor().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.UpdateAttestor][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.UpdateAttestorRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (attestorBuilder_ == null) { - attestor_ = null; - } else { - attestor_ = null; - attestorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest( - this); - if (attestorBuilder_ == null) { - result.attestor_ = attestor_; - } else { - result.attestor_ = attestorBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - .getDefaultInstance()) return this; - if (other.hasAttestor()) { - mergeAttestor(other.getAttestor()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor attestor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - attestorBuilder_; - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - public boolean hasAttestor() { - return attestorBuilder_ != null || attestor_ != null; - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - getAttestor() { - if (attestorBuilder_ == null) { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } else { - return attestorBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestor_ = value; - onChanged(); - } else { - attestorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - builderForValue) { - if (attestorBuilder_ == null) { - attestor_ = builderForValue.build(); - onChanged(); - } else { - attestorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeAttestor( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorBuilder_ == null) { - if (attestor_ != null) { - attestor_ = - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.newBuilder( - attestor_) - .mergeFrom(value) - .buildPartial(); - } else { - attestor_ = value; - } - onChanged(); - } else { - attestorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearAttestor() { - if (attestorBuilder_ == null) { - attestor_ = null; - onChanged(); - } else { - attestor_ = null; - attestorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - getAttestorBuilder() { - - onChanged(); - return getAttestorFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorOrBuilder() { - if (attestorBuilder_ != null) { - return attestorBuilder_.getMessageOrBuilder(); - } else { - return attestor_ == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance() - : attestor_; - } - } - /** - * - * - *
-       * Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will
-       * overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name
-       * in the request URL, in the format `projects/*/attestors/*`.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorFieldBuilder() { - if (attestorBuilder_ == null) { - attestorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorOrBuilder>(getAttestor(), getParentForChildren(), isClean()); - attestor_ = null; - } - return attestorBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.UpdateAttestorRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .UpdateAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.UpdateAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ListAttestorsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ListAttestorsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-     * Requested page size. The server may return fewer results than requested. If
-     * unspecified, the server will pick an appropriate default.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.ListAttestors][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsRequest} - */ - public static final class ListAttestorsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ListAttestorsRequest) - ListAttestorsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAttestorsRequest.newBuilder() to construct. - private ListAttestorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAttestorsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAttestorsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-     * 
- * - * - * 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 project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-     * 
- * - * - * 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_; - /** - * - * - *
-     * Requested page size. The server may return fewer results than requested. If
-     * unspecified, the server will pick an appropriate default.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.ListAttestors][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ListAttestorsRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest( - 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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - .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.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-       * Required. The resource name of the project associated with the
-       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-       * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the project associated with the
-       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-       * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the project associated with the
-       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-       * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the project associated with the
-       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-       * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the project associated with the
-       * [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`.
-       * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-       * Requested page size. The server may return fewer results than requested. If
-       * unspecified, the server will pick an appropriate default.
-       * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-       * Requested page size. The server may return fewer results than requested. If
-       * unspecified, the server will pick an appropriate default.
-       * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Requested page size. The server may return fewer results than requested. If
-       * unspecified, the server will pick an appropriate default.
-       * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-       * A token identifying a page of results the server should return. Typically,
-       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-       * from the previous call to the `ListAttestors` method.
-       * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A token identifying a page of results the server should return. Typically,
-       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-       * from the previous call to the `ListAttestors` method.
-       * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A token identifying a page of results the server should return. Typically,
-       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-       * from the previous call to the `ListAttestors` method.
-       * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * A token identifying a page of results the server should return. Typically,
-       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-       * from the previous call to the `ListAttestors` method.
-       * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-       * A token identifying a page of results the server should return. Typically,
-       * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned
-       * from the previous call to the `ListAttestors` method.
-       * 
- * - * 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.binaryauthorization.v1.ListAttestorsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ListAttestorsRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttestorsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ListAttestorsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ListAttestorsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - java.util.List - getAttestorsList(); - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( - int index); - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - int getAttestorsCount(); - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorsOrBuilderList(); - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorsOrBuilder(int index); - - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); - } - /** - * - * - *
-   * Response message for [BinauthzManagementService.ListAttestors][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsResponse} - */ - public static final class ListAttestorsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ListAttestorsResponse) - ListAttestorsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAttestorsResponse.newBuilder() to construct. - private ListAttestorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAttestorsResponse() { - attestors_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAttestorsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .Builder.class); - } - - public static final int ATTESTORS_FIELD_NUMBER = 1; - private java.util.List - attestors_; - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - @java.lang.Override - public java.util.List - getAttestorsList() { - return attestors_; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorsOrBuilderList() { - return attestors_; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - @java.lang.Override - public int getAttestorsCount() { - return attestors_.size(); - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( - int index) { - return attestors_.get(index); - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorsOrBuilder(int index) { - return attestors_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < attestors_.size(); i++) { - output.writeMessage(1, attestors_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < attestors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attestors_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) obj; - - if (!getAttestorsList().equals(other.getAttestorsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAttestorsCount() > 0) { - hash = (37 * hash) + ATTESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAttestorsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Response message for [BinauthzManagementService.ListAttestors][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ListAttestorsResponse} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ListAttestorsResponse) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (attestorsBuilder_ == null) { - attestors_ = java.util.Collections.emptyList(); - } else { - attestors_ = null; - attestorsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse( - this); - int from_bitField0_ = bitField0_; - if (attestorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - attestors_ = java.util.Collections.unmodifiableList(attestors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.attestors_ = attestors_; - } else { - result.attestors_ = attestorsBuilder_.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.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - .getDefaultInstance()) return this; - if (attestorsBuilder_ == null) { - if (!other.attestors_.isEmpty()) { - if (attestors_.isEmpty()) { - attestors_ = other.attestors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAttestorsIsMutable(); - attestors_.addAll(other.attestors_); - } - onChanged(); - } - } else { - if (!other.attestors_.isEmpty()) { - if (attestorsBuilder_.isEmpty()) { - attestorsBuilder_.dispose(); - attestorsBuilder_ = null; - attestors_ = other.attestors_; - bitField0_ = (bitField0_ & ~0x00000001); - attestorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAttestorsFieldBuilder() - : null; - } else { - attestorsBuilder_.addAllMessages(other.attestors_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor m = - input.readMessage( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .parser(), - extensionRegistry); - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(m); - } else { - attestorsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - attestors_ = java.util.Collections.emptyList(); - - private void ensureAttestorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - attestors_ = - new java.util.ArrayList< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor>( - attestors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - attestorsBuilder_; - - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - getAttestorsList() { - if (attestorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(attestors_); - } else { - return attestorsBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public int getAttestorsCount() { - if (attestorsBuilder_ == null) { - return attestors_.size(); - } else { - return attestorsBuilder_.getCount(); - } - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor getAttestors( - int index) { - if (attestorsBuilder_ == null) { - return attestors_.get(index); - } else { - return attestorsBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder setAttestors( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.set(index, value); - onChanged(); - } else { - attestorsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder setAttestors( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.set(index, builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder addAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.add(value); - onChanged(); - } else { - attestorsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder addAttestors( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.add(index, value); - onChanged(); - } else { - attestorsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder addAttestors( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder addAttestors( - int index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(index, builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder addAllAttestors( - java.lang.Iterable< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor> - values) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attestors_); - onChanged(); - } else { - attestorsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder clearAttestors() { - if (attestorsBuilder_ == null) { - attestors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - attestorsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public Builder removeAttestors(int index) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.remove(index); - onChanged(); - } else { - attestorsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - getAttestorsBuilder(int index) { - return getAttestorsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder - getAttestorsOrBuilder(int index) { - if (attestorsBuilder_ == null) { - return attestors_.get(index); - } else { - return attestorsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public java.util.List< - ? extends - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorsOrBuilderList() { - if (attestorsBuilder_ != null) { - return attestorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attestors_); - } - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - addAttestorsBuilder() { - return getAttestorsFieldBuilder() - .addBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance()); - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder - addAttestorsBuilder(int index) { - return getAttestorsFieldBuilder() - .addBuilder( - index, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor - .getDefaultInstance()); - } - /** - * - * - *
-       * The list of [attestors][google.cloud.binaryauthorization.v1.Attestor].
-       * 
- * - * repeated .google.cloud.binaryauthorization.v1.Attestor attestors = 1; - */ - public java.util.List< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder> - getAttestorsBuilderList() { - return getAttestorsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.AttestorOrBuilder> - getAttestorsFieldBuilder() { - if (attestorsBuilder_ == null) { - attestorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor, - com.google.protos.google.cloud.binaryauthorization.v1.Resources.Attestor.Builder, - com.google.protos.google.cloud.binaryauthorization.v1.Resources - .AttestorOrBuilder>( - attestors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - attestors_ = null; - } - return attestorsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-       * A token to retrieve the next page of results. Pass this value in the
-       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-       * `ListAttestors` method to retrieve the next page of results.
-       * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * A token to retrieve the next page of results. Pass this value in the
-       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-       * `ListAttestors` method to retrieve the next page of results.
-       * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * A token to retrieve the next page of results. Pass this value in the
-       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-       * `ListAttestors` method to retrieve the next page of results.
-       * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * A token to retrieve the next page of results. Pass this value in the
-       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-       * `ListAttestors` method to retrieve the next page of results.
-       * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-       * A token to retrieve the next page of results. Pass this value in the
-       * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the
-       * `ListAttestors` method to retrieve the next page of results.
-       * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1.ListAttestorsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ListAttestorsResponse) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ListAttestorsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttestorsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.ListAttestorsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface DeleteAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.DeleteAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.DeleteAttestorRequest} - */ - public static final class DeleteAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) - DeleteAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteAttestorRequest.newBuilder() to construct. - private DeleteAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteAttestorRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for [BinauthzManagementService.DeleteAttestor][].
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.DeleteAttestorRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest( - 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.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * - * 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.binaryauthorization.v1.DeleteAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.DeleteAttestorRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .DeleteAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.DeleteAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface GetSystemPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-     * Required. The resource name, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - } - /** - * - * - *
-   * Request to read the current system policy.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetSystemPolicyRequest} - */ - public static final class GetSystemPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) - GetSystemPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetSystemPolicyRequest.newBuilder() to construct. - private GetSystemPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetSystemPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSystemPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-     * Required. The resource name, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) - obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 read the current system policy.
-     * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.GetSystemPolicyRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .class, - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest(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.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-       * Required. The resource name, in the format `locations/*/policy`.
-       * Note that the system policy is not associated with a project.
-       * 
- * - * - * 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, in the format `locations/*/policy`.
-       * Note that the system policy is not associated with a project.
-       * 
- * - * - * 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, in the format `locations/*/policy`.
-       * Note that the system policy is not associated with a project.
-       * 
- * - * - * 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, in the format `locations/*/policy`.
-       * Note that the system policy is not associated with a project.
-       * 
- * - * - * 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, in the format `locations/*/policy`.
-       * Note that the system policy is not associated with a project.
-       * 
- * - * - * 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.binaryauthorization.v1.GetSystemPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.GetSystemPolicyRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .GetSystemPolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSystemPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service.GetSystemPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ValidateAttestationOccurrenceRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-     * [occurrence][grafeas.v1.Occurrence], in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestor. - */ - java.lang.String getAttestor(); - /** - * - * - *
-     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-     * [occurrence][grafeas.v1.Occurrence], in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestor. - */ - com.google.protobuf.ByteString getAttestorBytes(); - - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestation field is set. - */ - boolean hasAttestation(); - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestation. - */ - io.grafeas.v1.AttestationOccurrence getAttestation(); - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder(); - - /** - * - * - *
-     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-     * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceNote. - */ - java.lang.String getOccurrenceNote(); - /** - * - * - *
-     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-     * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceNote. - */ - com.google.protobuf.ByteString getOccurrenceNoteBytes(); - - /** - * - * - *
-     * Required. The URI of the artifact (e.g. container image) that is the
-     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-     * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceResourceUri. - */ - java.lang.String getOccurrenceResourceUri(); - /** - * - * - *
-     * Required. The URI of the artifact (e.g. container image) that is the
-     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-     * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceResourceUri. - */ - com.google.protobuf.ByteString getOccurrenceResourceUriBytes(); - } - /** - * - * - *
-   * Request message for
-   * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest} - */ - public static final class ValidateAttestationOccurrenceRequest - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) - ValidateAttestationOccurrenceRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValidateAttestationOccurrenceRequest.newBuilder() to construct. - private ValidateAttestationOccurrenceRequest( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ValidateAttestationOccurrenceRequest() { - attestor_ = ""; - occurrenceNote_ = ""; - occurrenceResourceUri_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateAttestationOccurrenceRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.class, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.Builder.class); - } - - public static final int ATTESTOR_FIELD_NUMBER = 1; - private volatile java.lang.Object attestor_; - /** - * - * - *
-     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-     * [occurrence][grafeas.v1.Occurrence], in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestor. - */ - @java.lang.Override - public java.lang.String getAttestor() { - java.lang.Object ref = attestor_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestor_ = s; - return s; - } - } - /** - * - * - *
-     * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-     * [occurrence][grafeas.v1.Occurrence], in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestor. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAttestorBytes() { - java.lang.Object ref = attestor_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTESTATION_FIELD_NUMBER = 2; - private io.grafeas.v1.AttestationOccurrence attestation_; - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestation field is set. - */ - @java.lang.Override - public boolean hasAttestation() { - return attestation_ != null; - } - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestation. - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrence getAttestation() { - return attestation_ == null - ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() - : attestation_; - } - /** - * - * - *
-     * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-     * be checked that it can be verified by the Attestor. It does not have to be
-     * an existing entity in Container Analysis. It must otherwise be a valid
-     * AttestationOccurrence.
-     * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - return getAttestation(); - } - - public static final int OCCURRENCE_NOTE_FIELD_NUMBER = 3; - private volatile java.lang.Object occurrenceNote_; - /** - * - * - *
-     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-     * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceNote. - */ - @java.lang.Override - public java.lang.String getOccurrenceNote() { - java.lang.Object ref = occurrenceNote_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - occurrenceNote_ = s; - return s; - } - } - /** - * - * - *
-     * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-     * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-     * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceNote. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOccurrenceNoteBytes() { - java.lang.Object ref = occurrenceNote_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - occurrenceNote_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int OCCURRENCE_RESOURCE_URI_FIELD_NUMBER = 4; - private volatile java.lang.Object occurrenceResourceUri_; - /** - * - * - *
-     * Required. The URI of the artifact (e.g. container image) that is the
-     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-     * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceResourceUri. - */ - @java.lang.Override - public java.lang.String getOccurrenceResourceUri() { - java.lang.Object ref = occurrenceResourceUri_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - occurrenceResourceUri_ = s; - return s; - } - } - /** - * - * - *
-     * Required. The URI of the artifact (e.g. container image) that is the
-     * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-     * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceResourceUri. - */ - @java.lang.Override - public com.google.protobuf.ByteString getOccurrenceResourceUriBytes() { - java.lang.Object ref = occurrenceResourceUri_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - occurrenceResourceUri_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestor_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attestor_); - } - if (attestation_ != null) { - output.writeMessage(2, getAttestation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceNote_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, occurrenceNote_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 4, occurrenceResourceUri_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestor_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attestor_); - } - if (attestation_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getAttestation()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceNote_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, occurrenceNote_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(occurrenceResourceUri_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, occurrenceResourceUri_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest) - obj; - - if (!getAttestor().equals(other.getAttestor())) return false; - if (hasAttestation() != other.hasAttestation()) return false; - if (hasAttestation()) { - if (!getAttestation().equals(other.getAttestation())) return false; - } - if (!getOccurrenceNote().equals(other.getOccurrenceNote())) return false; - if (!getOccurrenceResourceUri().equals(other.getOccurrenceResourceUri())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ATTESTOR_FIELD_NUMBER; - hash = (53 * hash) + getAttestor().hashCode(); - if (hasAttestation()) { - hash = (37 * hash) + ATTESTATION_FIELD_NUMBER; - hash = (53 * hash) + getAttestation().hashCode(); - } - hash = (37 * hash) + OCCURRENCE_NOTE_FIELD_NUMBER; - hash = (53 * hash) + getOccurrenceNote().hashCode(); - hash = (37 * hash) + OCCURRENCE_RESOURCE_URI_FIELD_NUMBER; - hash = (53 * hash) + getOccurrenceResourceUri().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Request message for
-     * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
-     * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.class, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - attestor_ = ""; - - if (attestationBuilder_ == null) { - attestation_ = null; - } else { - attestation_ = null; - attestationBuilder_ = null; - } - occurrenceNote_ = ""; - - occurrenceResourceUri_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest(this); - result.attestor_ = attestor_; - if (attestationBuilder_ == null) { - result.attestation_ = attestation_; - } else { - result.attestation_ = attestationBuilder_.build(); - } - result.occurrenceNote_ = occurrenceNote_; - result.occurrenceResourceUri_ = occurrenceResourceUri_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest.getDefaultInstance()) return this; - if (!other.getAttestor().isEmpty()) { - attestor_ = other.attestor_; - onChanged(); - } - if (other.hasAttestation()) { - mergeAttestation(other.getAttestation()); - } - if (!other.getOccurrenceNote().isEmpty()) { - occurrenceNote_ = other.occurrenceNote_; - onChanged(); - } - if (!other.getOccurrenceResourceUri().isEmpty()) { - occurrenceResourceUri_ = other.occurrenceResourceUri_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - attestor_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getAttestationFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - occurrenceNote_ = input.readStringRequireUtf8(); - - break; - } // case 26 - case 34: - { - occurrenceResourceUri_ = input.readStringRequireUtf8(); - - break; - } // case 34 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object attestor_ = ""; - /** - * - * - *
-       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-       * [occurrence][grafeas.v1.Occurrence], in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestor. - */ - public java.lang.String getAttestor() { - java.lang.Object ref = attestor_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestor_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-       * [occurrence][grafeas.v1.Occurrence], in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestor. - */ - public com.google.protobuf.ByteString getAttestorBytes() { - java.lang.Object ref = attestor_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestor_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-       * [occurrence][grafeas.v1.Occurrence], in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The attestor to set. - * @return This builder for chaining. - */ - public Builder setAttestor(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attestor_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-       * [occurrence][grafeas.v1.Occurrence], in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAttestor() { - - attestor_ = getDefaultInstance().getAttestor(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the
-       * [occurrence][grafeas.v1.Occurrence], in the format
-       * `projects/*/attestors/*`.
-       * 
- * - * string attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for attestor to set. - * @return This builder for chaining. - */ - public Builder setAttestorBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attestor_ = value; - onChanged(); - return this; - } - - private io.grafeas.v1.AttestationOccurrence attestation_; - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, - io.grafeas.v1.AttestationOccurrence.Builder, - io.grafeas.v1.AttestationOccurrenceOrBuilder> - attestationBuilder_; - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestation field is set. - */ - public boolean hasAttestation() { - return attestationBuilder_ != null || attestation_ != null; - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestation. - */ - public io.grafeas.v1.AttestationOccurrence getAttestation() { - if (attestationBuilder_ == null) { - return attestation_ == null - ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() - : attestation_; - } else { - return attestationBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestation_ = value; - onChanged(); - } else { - attestationBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestation(io.grafeas.v1.AttestationOccurrence.Builder builderForValue) { - if (attestationBuilder_ == null) { - attestation_ = builderForValue.build(); - onChanged(); - } else { - attestationBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeAttestation(io.grafeas.v1.AttestationOccurrence value) { - if (attestationBuilder_ == null) { - if (attestation_ != null) { - attestation_ = - io.grafeas.v1.AttestationOccurrence.newBuilder(attestation_) - .mergeFrom(value) - .buildPartial(); - } else { - attestation_ = value; - } - onChanged(); - } else { - attestationBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearAttestation() { - if (attestationBuilder_ == null) { - attestation_ = null; - onChanged(); - } else { - attestation_ = null; - attestationBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public io.grafeas.v1.AttestationOccurrence.Builder getAttestationBuilder() { - - onChanged(); - return getAttestationFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public io.grafeas.v1.AttestationOccurrenceOrBuilder getAttestationOrBuilder() { - if (attestationBuilder_ != null) { - return attestationBuilder_.getMessageOrBuilder(); - } else { - return attestation_ == null - ? io.grafeas.v1.AttestationOccurrence.getDefaultInstance() - : attestation_; - } - } - /** - * - * - *
-       * Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to
-       * be checked that it can be verified by the Attestor. It does not have to be
-       * an existing entity in Container Analysis. It must otherwise be a valid
-       * AttestationOccurrence.
-       * 
- * - * - * .grafeas.v1.AttestationOccurrence attestation = 2 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, - io.grafeas.v1.AttestationOccurrence.Builder, - io.grafeas.v1.AttestationOccurrenceOrBuilder> - getAttestationFieldBuilder() { - if (attestationBuilder_ == null) { - attestationBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - io.grafeas.v1.AttestationOccurrence, - io.grafeas.v1.AttestationOccurrence.Builder, - io.grafeas.v1.AttestationOccurrenceOrBuilder>( - getAttestation(), getParentForChildren(), isClean()); - attestation_ = null; - } - return attestationBuilder_; - } - - private java.lang.Object occurrenceNote_ = ""; - /** - * - * - *
-       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-       * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceNote. - */ - public java.lang.String getOccurrenceNote() { - java.lang.Object ref = occurrenceNote_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - occurrenceNote_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-       * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceNote. - */ - public com.google.protobuf.ByteString getOccurrenceNoteBytes() { - java.lang.Object ref = occurrenceNote_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - occurrenceNote_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-       * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The occurrenceNote to set. - * @return This builder for chaining. - */ - public Builder setOccurrenceNote(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - occurrenceNote_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-       * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOccurrenceNote() { - - occurrenceNote_ = getDefaultInstance().getOccurrenceNote(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The resource name of the [Note][grafeas.v1.Note] to which the
-       * containing [Occurrence][grafeas.v1.Occurrence] is associated.
-       * 
- * - * string occurrence_note = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for occurrenceNote to set. - * @return This builder for chaining. - */ - public Builder setOccurrenceNoteBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - occurrenceNote_ = value; - onChanged(); - return this; - } - - private java.lang.Object occurrenceResourceUri_ = ""; - /** - * - * - *
-       * Required. The URI of the artifact (e.g. container image) that is the
-       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-       * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The occurrenceResourceUri. - */ - public java.lang.String getOccurrenceResourceUri() { - java.lang.Object ref = occurrenceResourceUri_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - occurrenceResourceUri_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * Required. The URI of the artifact (e.g. container image) that is the
-       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-       * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for occurrenceResourceUri. - */ - public com.google.protobuf.ByteString getOccurrenceResourceUriBytes() { - java.lang.Object ref = occurrenceResourceUri_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - occurrenceResourceUri_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * Required. The URI of the artifact (e.g. container image) that is the
-       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-       * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The occurrenceResourceUri to set. - * @return This builder for chaining. - */ - public Builder setOccurrenceResourceUri(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - occurrenceResourceUri_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The URI of the artifact (e.g. container image) that is the
-       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-       * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearOccurrenceResourceUri() { - - occurrenceResourceUri_ = getDefaultInstance().getOccurrenceResourceUri(); - onChanged(); - return this; - } - /** - * - * - *
-       * Required. The URI of the artifact (e.g. container image) that is the
-       * subject of the containing [Occurrence][grafeas.v1.Occurrence].
-       * 
- * - * string occurrence_resource_uri = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for occurrenceResourceUri to set. - * @return This builder for chaining. - */ - public Builder setOccurrenceResourceUriBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - occurrenceResourceUri_ = 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.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceRequest) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValidateAttestationOccurrenceRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface ValidateAttestationOccurrenceResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The result of the Attestation validation.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The enum numeric value on the wire for result. - */ - int getResultValue(); - /** - * - * - *
-     * The result of the Attestation validation.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The result. - */ - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - getResult(); - - /** - * - * - *
-     * The reason for denial if the Attestation couldn't be validated.
-     * 
- * - * string denial_reason = 2; - * - * @return The denialReason. - */ - java.lang.String getDenialReason(); - /** - * - * - *
-     * The reason for denial if the Attestation couldn't be validated.
-     * 
- * - * string denial_reason = 2; - * - * @return The bytes for denialReason. - */ - com.google.protobuf.ByteString getDenialReasonBytes(); - } - /** - * - * - *
-   * Response message for
-   * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse} - */ - public static final class ValidateAttestationOccurrenceResponse - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) - ValidateAttestationOccurrenceResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ValidateAttestationOccurrenceResponse.newBuilder() to construct. - private ValidateAttestationOccurrenceResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ValidateAttestationOccurrenceResponse() { - result_ = 0; - denialReason_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ValidateAttestationOccurrenceResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.class, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Builder.class); - } - - /** - * - * - *
-     * The enum returned in the "result" field.
-     * 
- * - * Protobuf enum {@code - * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result} - */ - public enum Result implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * Unspecified.
-       * 
- * - * RESULT_UNSPECIFIED = 0; - */ - RESULT_UNSPECIFIED(0), - /** - * - * - *
-       * The Attestation was able to verified by the Attestor.
-       * 
- * - * VERIFIED = 1; - */ - VERIFIED(1), - /** - * - * - *
-       * The Attestation was not able to verified by the Attestor.
-       * 
- * - * ATTESTATION_NOT_VERIFIABLE = 2; - */ - ATTESTATION_NOT_VERIFIABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * Unspecified.
-       * 
- * - * RESULT_UNSPECIFIED = 0; - */ - public static final int RESULT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The Attestation was able to verified by the Attestor.
-       * 
- * - * VERIFIED = 1; - */ - public static final int VERIFIED_VALUE = 1; - /** - * - * - *
-       * The Attestation was not able to verified by the Attestor.
-       * 
- * - * ATTESTATION_NOT_VERIFIABLE = 2; - */ - public static final int ATTESTATION_NOT_VERIFIABLE_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 Result 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 Result forNumber(int value) { - switch (value) { - case 0: - return RESULT_UNSPECIFIED; - case 1: - return VERIFIED; - case 2: - return ATTESTATION_NOT_VERIFIABLE; - 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 Result findValueByNumber(int number) { - return Result.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.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final Result[] VALUES = values(); - - public static Result 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 Result(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result) - } - - public static final int RESULT_FIELD_NUMBER = 1; - private int result_; - /** - * - * - *
-     * The result of the Attestation validation.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The enum numeric value on the wire for result. - */ - @java.lang.Override - public int getResultValue() { - return result_; - } - /** - * - * - *
-     * The result of the Attestation validation.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The result. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - getResult() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - result = - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.valueOf(result_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.UNRECOGNIZED - : result; - } - - public static final int DENIAL_REASON_FIELD_NUMBER = 2; - private volatile java.lang.Object denialReason_; - /** - * - * - *
-     * The reason for denial if the Attestation couldn't be validated.
-     * 
- * - * string denial_reason = 2; - * - * @return The denialReason. - */ - @java.lang.Override - public java.lang.String getDenialReason() { - java.lang.Object ref = denialReason_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - denialReason_ = s; - return s; - } - } - /** - * - * - *
-     * The reason for denial if the Attestation couldn't be validated.
-     * 
- * - * string denial_reason = 2; - * - * @return The bytes for denialReason. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDenialReasonBytes() { - java.lang.Object ref = denialReason_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - denialReason_ = 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 (result_ - != com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.RESULT_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, result_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, denialReason_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (result_ - != com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.RESULT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, result_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(denialReason_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, denialReason_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse)) { - return super.equals(obj); - } - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - other = - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse) - obj; - - if (result_ != other.result_) return false; - if (!getDenialReason().equals(other.getDenialReason())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + result_; - hash = (37 * hash) + DENIAL_REASON_FIELD_NUMBER; - hash = (53 * hash) + getDenialReason().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-     * Response message for
-     * [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence].
-     * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.class, - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Builder.class); - } - - // Construct using - // com.google.protos.google.cloud.binaryauthorization.v1.Service.ValidateAttestationOccurrenceResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - result_ = 0; - - denialReason_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - getDefaultInstanceForType() { - return com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - build() { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - buildPartial() { - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - result = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse(this); - result.result_ = result_; - result.denialReason_ = denialReason_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse) { - return mergeFrom( - (com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - other) { - if (other - == com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.getDefaultInstance()) return this; - if (other.result_ != 0) { - setResultValue(other.getResultValue()); - } - if (!other.getDenialReason().isEmpty()) { - denialReason_ = other.denialReason_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - result_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - denialReason_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int result_ = 0; - /** - * - * - *
-       * The result of the Attestation validation.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The enum numeric value on the wire for result. - */ - @java.lang.Override - public int getResultValue() { - return result_; - } - /** - * - * - *
-       * The result of the Attestation validation.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @param value The enum numeric value on the wire for result to set. - * @return This builder for chaining. - */ - public Builder setResultValue(int value) { - - result_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The result of the Attestation validation.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return The result. - */ - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - getResult() { - @SuppressWarnings("deprecation") - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - result = - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.valueOf(result_); - return result == null - ? com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * The result of the Attestation validation.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @param value The result to set. - * @return This builder for chaining. - */ - public Builder setResult( - com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse.Result - value) { - if (value == null) { - throw new NullPointerException(); - } - - result_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * The result of the Attestation validation.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse.Result result = 1; - * - * - * @return This builder for chaining. - */ - public Builder clearResult() { - - result_ = 0; - onChanged(); - return this; - } - - private java.lang.Object denialReason_ = ""; - /** - * - * - *
-       * The reason for denial if the Attestation couldn't be validated.
-       * 
- * - * string denial_reason = 2; - * - * @return The denialReason. - */ - public java.lang.String getDenialReason() { - java.lang.Object ref = denialReason_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - denialReason_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The reason for denial if the Attestation couldn't be validated.
-       * 
- * - * string denial_reason = 2; - * - * @return The bytes for denialReason. - */ - public com.google.protobuf.ByteString getDenialReasonBytes() { - java.lang.Object ref = denialReason_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - denialReason_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The reason for denial if the Attestation couldn't be validated.
-       * 
- * - * string denial_reason = 2; - * - * @param value The denialReason to set. - * @return This builder for chaining. - */ - public Builder setDenialReason(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - denialReason_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The reason for denial if the Attestation couldn't be validated.
-       * 
- * - * string denial_reason = 2; - * - * @return This builder for chaining. - */ - public Builder clearDenialReason() { - - denialReason_ = getDefaultInstance().getDenialReason(); - onChanged(); - return this; - } - /** - * - * - *
-       * The reason for denial if the Attestation couldn't be validated.
-       * 
- * - * string denial_reason = 2; - * - * @param value The bytes for denialReason to set. - * @return This builder for chaining. - */ - public Builder setDenialReasonBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - denialReason_ = 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.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1.ValidateAttestationOccurrenceResponse) - private static final com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse(); - } - - public static com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ValidateAttestationOccurrenceResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.protos.google.cloud.binaryauthorization.v1.Service - .ValidateAttestationOccurrenceResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor; - private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_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/binaryauthorization/v1/se" - + "rvice.proto\022#google.cloud.binaryauthoriz" - + "ation.v1\032\034google/api/annotations.proto\032\027" - + "google/api/client.proto\032\037google/api/fiel" - + "d_behavior.proto\032\031google/api/resource.pr" - + "oto\0323google/cloud/binaryauthorization/v1" - + "/resources.proto\032\033google/protobuf/empty." - + "proto\032\034grafeas/v1/attestation.proto\"S\n\020G" - + "etPolicyRequest\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)b" - + "inaryauthorization.googleapis.com/Policy" - + "\"W\n\023UpdatePolicyRequest\022@\n\006policy\030\001 \001(\0132" - + "+.google.cloud.binaryauthorization.v1.Po" - + "licyB\003\340A\002\"\274\001\n\025CreateAttestorRequest\022C\n\006p" - + "arent\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanage" - + "r.googleapis.com/Project\022\030\n\013attestor_id\030" - + "\002 \001(\tB\003\340A\002\022D\n\010attestor\030\003 \001(\0132-.google.cl" - + "oud.binaryauthorization.v1.AttestorB\003\340A\002" - + "\"W\n\022GetAttestorRequest\022A\n\004name\030\001 \001(\tB3\340A" - + "\002\372A-\n+binaryauthorization.googleapis.com" - + "/Attestor\"]\n\025UpdateAttestorRequest\022D\n\010at" - + "testor\030\001 \001(\0132-.google.cloud.binaryauthor" - + "ization.v1.AttestorB\003\340A\002\"\202\001\n\024ListAttesto" - + "rsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloud" - + "resourcemanager.googleapis.com/Project\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"r\n" - + "\025ListAttestorsResponse\022@\n\tattestors\030\001 \003(" - + "\0132-.google.cloud.binaryauthorization.v1." - + "Attestor\022\027\n\017next_page_token\030\002 \001(\t\"Z\n\025Del" - + "eteAttestorRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-" - + "\n+binaryauthorization.googleapis.com/Att" - + "estor\"Y\n\026GetSystemPolicyRequest\022?\n\004name\030" - + "\001 \001(\tB1\340A\002\372A+\n)binaryauthorization.googl" - + "eapis.com/Policy\"\276\001\n$ValidateAttestation" - + "OccurrenceRequest\022\025\n\010attestor\030\001 \001(\tB\003\340A\002" - + "\022;\n\013attestation\030\002 \001(\0132!.grafeas.v1.Attes" - + "tationOccurrenceB\003\340A\002\022\034\n\017occurrence_note" - + "\030\003 \001(\tB\003\340A\002\022$\n\027occurrence_resource_uri\030\004" - + " \001(\tB\003\340A\002\"\361\001\n%ValidateAttestationOccurre" - + "nceResponse\022a\n\006result\030\001 \001(\0162Q.google.clo" - + "ud.binaryauthorization.v1.ValidateAttest" - + "ationOccurrenceResponse.Result\022\025\n\rdenial" - + "_reason\030\002 \001(\t\"N\n\006Result\022\026\n\022RESULT_UNSPEC" - + "IFIED\020\000\022\014\n\010VERIFIED\020\001\022\036\n\032ATTESTATION_NOT" - + "_VERIFIABLE\020\0022\342\n\n\033BinauthzManagementServ" - + "iceV1\022\234\001\n\tGetPolicy\0225.google.cloud.binar" - + "yauthorization.v1.GetPolicyRequest\032+.goo" - + "gle.cloud.binaryauthorization.v1.Policy\"" - + "+\202\323\344\223\002\036\022\034/v1/{name=projects/*/policy}\332A\004" - + "name\022\263\001\n\014UpdatePolicy\0228.google.cloud.bin" - + "aryauthorization.v1.UpdatePolicyRequest\032" - + "+.google.cloud.binaryauthorization.v1.Po" - + "licy\"<\202\323\344\223\002-\032#/v1/{policy.name=projects/" - + "*/policy}:\006policy\332A\006policy\022\316\001\n\016CreateAtt" - + "estor\022:.google.cloud.binaryauthorization" - + ".v1.CreateAttestorRequest\032-.google.cloud" - + ".binaryauthorization.v1.Attestor\"Q\202\323\344\223\002-" - + "\"!/v1/{parent=projects/*}/attestors:\010att" - + "estor\332A\033parent,attestor_id,attestor\022\247\001\n\013" - + "GetAttestor\0227.google.cloud.binaryauthori" - + "zation.v1.GetAttestorRequest\032-.google.cl" - + "oud.binaryauthorization.v1.Attestor\"0\202\323\344" - + "\223\002#\022!/v1/{name=projects/*/attestors/*}\332A" - + "\004name\022\304\001\n\016UpdateAttestor\022:.google.cloud." - + "binaryauthorization.v1.UpdateAttestorReq" - + "uest\032-.google.cloud.binaryauthorization." - + "v1.Attestor\"G\202\323\344\223\0026\032*/v1/{attestor.name=" - + "projects/*/attestors/*}:\010attestor\332A\010atte" - + "stor\022\272\001\n\rListAttestors\0229.google.cloud.bi" - + "naryauthorization.v1.ListAttestorsReques" - + "t\032:.google.cloud.binaryauthorization.v1." - + "ListAttestorsResponse\"2\202\323\344\223\002#\022!/v1/{pare" - + "nt=projects/*}/attestors\332A\006parent\022\226\001\n\016De" - + "leteAttestor\022:.google.cloud.binaryauthor" - + "ization.v1.DeleteAttestorRequest\032\026.googl" - + "e.protobuf.Empty\"0\202\323\344\223\002#*!/v1/{name=proj" - + "ects/*/attestors/*}\332A\004name\032V\312A\"binaryaut" - + "horization.googleapis.com\322A.https://www." - + "googleapis.com/auth/cloud-platform2\224\002\n\016S" - + "ystemPolicyV1\022\251\001\n\017GetSystemPolicy\022;.goog" - + "le.cloud.binaryauthorization.v1.GetSyste" - + "mPolicyRequest\032+.google.cloud.binaryauth" - + "orization.v1.Policy\",\202\323\344\223\002\037\022\035/v1/{name=l" - + "ocations/*/policy}\332A\004name\032V\312A\"binaryauth" - + "orization.googleapis.com\322A.https://www.g" - + "oogleapis.com/auth/cloud-platform2\365\002\n\022Va" - + "lidationHelperV1\022\206\002\n\035ValidateAttestation" - + "Occurrence\022I.google.cloud.binaryauthoriz" - + "ation.v1.ValidateAttestationOccurrenceRe" - + "quest\032J.google.cloud.binaryauthorization" - + ".v1.ValidateAttestationOccurrenceRespons" - + "e\"N\202\323\344\223\002H\"C/v1/{attestor=projects/*/atte" - + "stors/*}:validateAttestationOccurrence:\001" - + "*\032V\312A\"binaryauthorization.googleapis.com" - + "\322A.https://www.googleapis.com/auth/cloud" - + "-platformB\211\002\n5com.google.protos.google.c" - + "loud.binaryauthorization.v1P\000ZVgoogle.go" - + "lang.org/genproto/googleapis/cloud/binar" - + "yauthorization/v1;binaryauthorization\370\001\001" - + "\252\002#Google.Cloud.BinaryAuthorization.V1\312\002" - + "#Google\\Cloud\\BinaryAuthorization\\V1\352\002&G" - + "oogle::Cloud::BinaryAuthorization::V1b\006p" - + "roto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.protos.google.cloud.binaryauthorization.v1.Resources.getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - io.grafeas.v1.Attestation.getDescriptor(), - }); - internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_GetPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_UpdatePolicyRequest_descriptor, - new java.lang.String[] { - "Policy", - }); - internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_CreateAttestorRequest_descriptor, - new java.lang.String[] { - "Parent", "AttestorId", "Attestor", - }); - internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_GetAttestorRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_UpdateAttestorRequest_descriptor, - new java.lang.String[] { - "Attestor", - }); - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_ListAttestorsResponse_descriptor, - new java.lang.String[] { - "Attestors", "NextPageToken", - }); - internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_DeleteAttestorRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_GetSystemPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceRequest_descriptor, - new java.lang.String[] { - "Attestor", "Attestation", "OccurrenceNote", "OccurrenceResourceUri", - }); - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1_ValidateAttestationOccurrenceResponse_descriptor, - new java.lang.String[] { - "Result", "DenialReason", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protos.google.cloud.binaryauthorization.v1.Resources.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - io.grafeas.v1.Attestation.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto deleted file mode 100644 index 5df7f58b..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/resources.proto +++ /dev/null @@ -1,333 +0,0 @@ -// 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.binaryauthorization.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1;binaryauthorization"; -option java_multiple_files = false; -option java_package = "com.google.protos.google.cloud.binaryauthorization.v1"; -option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1"; -option ruby_package = "Google::Cloud::BinaryAuthorization::V1"; - -// A [policy][google.cloud.binaryauthorization.v1.Policy] for container image binary authorization. -message Policy { - option (google.api.resource) = { - type: "binaryauthorization.googleapis.com/Policy" - pattern: "projects/{project}/policy" - pattern: "locations/{location}/policy" - }; - - enum GlobalPolicyEvaluationMode { - // Not specified: DISABLE is assumed. - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - - // Enables system policy evaluation. - ENABLE = 1; - - // Disables system policy evaluation. - DISABLE = 2; - } - - // Output only. The resource name, in the format `projects/*/policy`. There is - // at most one policy per project. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. A descriptive comment. - string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Controls the evaluation of a Google-maintained global admission - // policy for common system-level images. Images not covered by the global - // policy will be subject to the project admission policy. This setting - // has no effect when specified inside a global admission policy. - GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Admission policy allowlisting. A matching admission request will - // always be permitted. This feature is typically used to exclude Google or - // third-party infrastructure images from Binary Authorization policies. - repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-cluster admission rules. Cluster spec format: - // `location.clusterId`. There can be at most one admission rule per cluster - // spec. - // A `location` is either a compute zone (e.g. us-central1-a) or a region - // (e.g. us-central1). - // For `clusterId` syntax restrictions see - // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - map cluster_admission_rules = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - // [a-z.-]+, e.g. 'some-namespace' - map kubernetes_namespace_admission_rules = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-kubernetes-service-account admission rules. Service account - // spec format: `namespace:serviceaccount`. e.g. 'test-ns:default' - map kubernetes_service_account_admission_rules = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-istio-service-identity admission rules. Istio service - // identity spec format: - // spiffe:///ns//sa/ or - // /ns//sa/ - // e.g. spiffe://example.com/ns/test-ns/sa/default - map istio_service_identity_admission_rules = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Default admission rule for a cluster without a per-cluster, per- - // kubernetes-service-account, or per-istio-service-identity admission rule. - AdmissionRule default_admission_rule = 4 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Time when the policy was last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// An [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] exempts images -// from checks by [admission rules][google.cloud.binaryauthorization.v1.AdmissionRule]. -message AdmissionWhitelistPattern { - // An image name pattern to allowlist, in the form `registry/path/to/image`. - // This supports a trailing `*` wildcard, but this is allowed only in - // text after the `registry/` part. This also supports a trailing `**` - // wildcard which matches subdirectories of a given entry. - string name_pattern = 1; -} - -// An [admission rule][google.cloud.binaryauthorization.v1.AdmissionRule] specifies either that all container images -// used in a pod creation request must be attested to by one or more -// [attestors][google.cloud.binaryauthorization.v1.Attestor], that all pod creations will be allowed, or that all -// pod creations will be denied. -// -// Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1.AdmissionWhitelistPattern] -// are exempted from admission rules and will never block a pod creation. -message AdmissionRule { - enum EvaluationMode { - // Do not use. - EVALUATION_MODE_UNSPECIFIED = 0; - - // This rule allows all all pod creations. - ALWAYS_ALLOW = 1; - - // This rule allows a pod creation if all the attestors listed in - // 'require_attestations_by' have valid attestations for all of the - // images in the pod spec. - REQUIRE_ATTESTATION = 2; - - // This rule denies all pod creations. - ALWAYS_DENY = 3; - } - - // Defines the possible actions when a pod creation is denied by an admission - // rule. - enum EnforcementMode { - // Do not use. - ENFORCEMENT_MODE_UNSPECIFIED = 0; - - // Enforce the admission rule by blocking the pod creation. - ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - - // Dryrun mode: Audit logging only. This will allow the pod creation as if - // the admission request had specified break-glass. - DRYRUN_AUDIT_LOG_ONLY = 2; - } - - // Required. How this admission rule will be evaluated. - EvaluationMode evaluation_mode = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The resource names of the attestors that must attest to - // a container image, in the format `projects/*/attestors/*`. Each - // attestor must exist before a policy can reference it. To add an attestor - // to a policy the principal issuing the policy change request must be able - // to read the attestor resource. - // - // Note: this field must be non-empty when the evaluation_mode field specifies - // REQUIRE_ATTESTATION, otherwise it must be empty. - repeated string require_attestations_by = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The action when a pod creation is denied by the admission rule. - EnforcementMode enforcement_mode = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// An [attestor][google.cloud.binaryauthorization.v1.Attestor] that attests to container image -// artifacts. An existing attestor cannot be modified except where -// indicated. -message Attestor { - option (google.api.resource) = { - type: "binaryauthorization.googleapis.com/Attestor" - pattern: "projects/{project}/attestors/{attestor}" - }; - - // Required. The resource name, in the format: - // `projects/*/attestors/*`. This field may not be updated. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A descriptive comment. This field may be updated. - // The field may be displayed in chooser dialogs. - string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - oneof attestor_type { - // This specifies how an attestation will be read, and how it will be used - // during policy enforcement. - UserOwnedGrafeasNote user_owned_grafeas_note = 3; - } - - // Output only. Time when the attestor was last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// An [user owned Grafeas note][google.cloud.binaryauthorization.v1.UserOwnedGrafeasNote] references a Grafeas -// Attestation.Authority Note created by the user. -message UserOwnedGrafeasNote { - // Required. The Grafeas resource name of a Attestation.Authority Note, - // created by the user, in the format: `projects/*/notes/*`. This field may - // not be updated. - // - // An attestation by this attestor is stored as a Grafeas - // Attestation.Authority Occurrence that names a container image and that - // links to this Note. Grafeas is an external dependency. - string note_reference = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Public keys that verify attestations signed by this - // attestor. This field may be updated. - // - // If this field is non-empty, one of the specified public keys must - // verify that an attestation was signed by this attestor for the - // image specified in the admission request. - // - // If this field is empty, this attestor always returns that no - // valid attestations exist. - repeated AttestorPublicKey public_keys = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. This field will contain the service account email address - // that this Attestor will use as the principal when querying Container - // Analysis. Attestor administrators must grant this service account the - // IAM role needed to read attestations from the [note_reference][Note] in - // Container Analysis (`containeranalysis.notes.occurrences.viewer`). - // - // This email address is fixed for the lifetime of the Attestor, but callers - // should not make any other assumptions about the service account email; - // future versions may use an email based on a different naming pattern. - string delegation_service_account_email = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A public key in the PkixPublicKey format (see -// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). -// Public keys of this type are typically textually encoded using the PEM -// format. -message PkixPublicKey { - // Represents a signature algorithm and other information necessary to verify - // signatures with a given public key. - // This is based primarily on the public key types supported by Tink's - // PemKeyType, which is in turn based on KMS's supported signing algorithms. - // See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz - // might support additional public key types independently of Tink and/or KMS. - enum SignatureAlgorithm { - option allow_alias = true; - - // Not specified. - SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - - // RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_PSS_2048_SHA256 = 1; - - // RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_PSS_3072_SHA256 = 2; - - // RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_PSS_4096_SHA256 = 3; - - // RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_PSS_4096_SHA512 = 4; - - // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5; - - // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6; - - // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7; - - // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - RSA_SIGN_PKCS1_4096_SHA512 = 8; - - // ECDSA on the NIST P-256 curve with a SHA256 digest. - ECDSA_P256_SHA256 = 9; - - // ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 9; - - // ECDSA on the NIST P-384 curve with a SHA384 digest. - ECDSA_P384_SHA384 = 10; - - // ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 10; - - // ECDSA on the NIST P-521 curve with a SHA512 digest. - ECDSA_P521_SHA512 = 11; - - // ECDSA on the NIST P-521 curve with a SHA512 digest. - EC_SIGN_P521_SHA512 = 11; - } - - // A PEM-encoded public key, as described in - // https://tools.ietf.org/html/rfc7468#section-13 - string public_key_pem = 1; - - // The signature algorithm used to verify a message against a signature using - // this key. - // These signature algorithm must match the structure and any object - // identifiers encoded in `public_key_pem` (i.e. this algorithm must match - // that of the public key). - SignatureAlgorithm signature_algorithm = 2; -} - -// An [attestor public key][google.cloud.binaryauthorization.v1.AttestorPublicKey] that will be used to verify -// attestations signed by this attestor. -message AttestorPublicKey { - // Optional. A descriptive comment. This field may be updated. - string comment = 1 [(google.api.field_behavior) = OPTIONAL]; - - // The ID of this public key. - // Signatures verified by BinAuthz must include the ID of the public key that - // can be used to verify them, and that ID must match the contents of this - // field exactly. - // Additional restrictions on this field can be imposed based on which public - // key type is encapsulated. See the documentation on `public_key` cases below - // for details. - string id = 2; - - oneof public_key { - // ASCII-armored representation of a PGP public key, as the entire output by - // the command `gpg --export --armor foo@example.com` (either LF or CRLF - // line endings). - // When using this field, `id` should be left blank. The BinAuthz API - // handlers will calculate the ID and fill it in automatically. BinAuthz - // computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - // upper-case hex. If `id` is provided by the caller, it will be - // overwritten by the API-calculated ID. - string ascii_armored_pgp_public_key = 3; - - // A raw PKIX SubjectPublicKeyInfo format public key. - // - // NOTE: `id` may be explicitly provided by the caller when using this - // type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - // blank, a default one will be computed based on the digest of the DER - // encoding of the public key. - PkixPublicKey pkix_public_key = 5; - } -} diff --git a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto b/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto deleted file mode 100644 index e063aacc..00000000 --- a/proto-google-cloud-binary-authorization-v1/src/main/proto/google/cloud/binaryauthorization/v1/service.proto +++ /dev/null @@ -1,312 +0,0 @@ -// 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.binaryauthorization.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/binaryauthorization/v1/resources.proto"; -import "google/protobuf/empty.proto"; -import "grafeas/v1/attestation.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1;binaryauthorization"; -option java_multiple_files = false; -option java_package = "com.google.protos.google.cloud.binaryauthorization.v1"; -option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1"; -option ruby_package = "Google::Cloud::BinaryAuthorization::V1"; - -// Customer-facing API for Cloud Binary Authorization. - -// Google Cloud Management Service for Binary Authorization admission policies -// and attestation authorities. -// -// This API implements a REST model with the following objects: -// -// * [Policy][google.cloud.binaryauthorization.v1.Policy] -// * [Attestor][google.cloud.binaryauthorization.v1.Attestor] -service BinauthzManagementServiceV1 { - option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // A [policy][google.cloud.binaryauthorization.v1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1.Attestor] that must attest to - // a container image, before the project is allowed to deploy that - // image. There is at most one policy per project. All image admission - // requests are permitted if a project has no policy. - // - // Gets the [policy][google.cloud.binaryauthorization.v1.Policy] for this project. Returns a default - // [policy][google.cloud.binaryauthorization.v1.Policy] if the project does not have one. - rpc GetPolicy(GetPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v1/{name=projects/*/policy}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1.Policy], and returns a copy of the - // new [policy][google.cloud.binaryauthorization.v1.Policy]. A policy is always updated as a whole, to avoid race - // conditions with concurrent policy enforcement (or management!) - // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - // if the request is malformed. - rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) { - option (google.api.http) = { - put: "/v1/{policy.name=projects/*/policy}" - body: "policy" - }; - option (google.api.method_signature) = "policy"; - } - - // Creates an [attestor][google.cloud.binaryauthorization.v1.Attestor], and returns a copy of the new - // [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the project does not exist, - // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - // [attestor][google.cloud.binaryauthorization.v1.Attestor] already exists. - rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) { - option (google.api.http) = { - post: "/v1/{parent=projects/*}/attestors" - body: "attestor" - }; - option (google.api.method_signature) = "parent,attestor_id,attestor"; - } - - // Gets an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc GetAttestor(GetAttestorRequest) returns (Attestor) { - option (google.api.http) = { - get: "/v1/{name=projects/*/attestors/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates an [attestor][google.cloud.binaryauthorization.v1.Attestor]. - // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) { - option (google.api.http) = { - put: "/v1/{attestor.name=projects/*/attestors/*}" - body: "attestor" - }; - option (google.api.method_signature) = "attestor"; - } - - // Lists [attestors][google.cloud.binaryauthorization.v1.Attestor]. - // Returns INVALID_ARGUMENT if the project does not exist. - rpc ListAttestors(ListAttestorsRequest) returns (ListAttestorsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*}/attestors" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes an [attestor][google.cloud.binaryauthorization.v1.Attestor]. Returns NOT_FOUND if the - // [attestor][google.cloud.binaryauthorization.v1.Attestor] does not exist. - rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/attestors/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// API for working with the system policy. -service SystemPolicyV1 { - option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Gets the current system policy in the specified location. - rpc GetSystemPolicy(GetSystemPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v1/{name=locations/*/policy}" - }; - option (google.api.method_signature) = "name"; - } -} - -// BinAuthz Attestor verification -service ValidationHelperV1 { - option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Returns whether the given Attestation for the given image URI - // was signed by the given Attestor - rpc ValidateAttestationOccurrence(ValidateAttestationOccurrenceRequest) returns (ValidateAttestationOccurrenceResponse) { - option (google.api.http) = { - post: "/v1/{attestor=projects/*/attestors/*}:validateAttestationOccurrence" - body: "*" - }; - } -} - -// Request message for [BinauthzManagementService.GetPolicy][]. -message GetPolicyRequest { - // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1.Policy] to retrieve, - // in the format `projects/*/policy`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Policy" - } - ]; -} - -// Request message for [BinauthzManagementService.UpdatePolicy][]. -message UpdatePolicyRequest { - // Required. A new or updated [policy][google.cloud.binaryauthorization.v1.Policy] value. The service will - // overwrite the [policy name][google.cloud.binaryauthorization.v1.Policy.name] field with the resource name in - // the request URL, in the format `projects/*/policy`. - Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.CreateAttestor][]. -message CreateAttestorRequest { - // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1.Attestor]. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The [attestors][google.cloud.binaryauthorization.v1.Attestor] ID. - string attestor_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The initial [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - // overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name, - // in the format `projects/*/attestors/*`. - Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.GetAttestor][]. -message GetAttestorRequest { - // Required. The name of the [attestor][google.cloud.binaryauthorization.v1.Attestor] to retrieve, in the format - // `projects/*/attestors/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Attestor" - } - ]; -} - -// Request message for [BinauthzManagementService.UpdateAttestor][]. -message UpdateAttestorRequest { - // Required. The updated [attestor][google.cloud.binaryauthorization.v1.Attestor] value. The service will - // overwrite the [attestor name][google.cloud.binaryauthorization.v1.Attestor.name] field with the resource name - // in the request URL, in the format `projects/*/attestors/*`. - Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.ListAttestors][]. -message ListAttestorsRequest { - // Required. The resource name of the project associated with the - // [attestors][google.cloud.binaryauthorization.v1.Attestor], in the format `projects/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Requested page size. The server may return fewer results than requested. If - // unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results the server should return. Typically, - // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1.ListAttestorsResponse.next_page_token] returned - // from the previous call to the `ListAttestors` method. - string page_token = 3; -} - -// Response message for [BinauthzManagementService.ListAttestors][]. -message ListAttestorsResponse { - // The list of [attestors][google.cloud.binaryauthorization.v1.Attestor]. - repeated Attestor attestors = 1; - - // A token to retrieve the next page of results. Pass this value in the - // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1.ListAttestorsRequest.page_token] field in the subsequent call to the - // `ListAttestors` method to retrieve the next page of results. - string next_page_token = 2; -} - -// Request message for [BinauthzManagementService.DeleteAttestor][]. -message DeleteAttestorRequest { - // Required. The name of the [attestors][google.cloud.binaryauthorization.v1.Attestor] to delete, in the format - // `projects/*/attestors/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Attestor" - } - ]; -} - -// Request to read the current system policy. -message GetSystemPolicyRequest { - // Required. The resource name, in the format `locations/*/policy`. - // Note that the system policy is not associated with a project. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Policy" - } - ]; -} - -// Request message for -// [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence]. -message ValidateAttestationOccurrenceRequest { - // Required. The resource name of the [Attestor][google.cloud.binaryauthorization.v1.Attestor] of the - // [occurrence][grafeas.v1.Occurrence], in the format - // `projects/*/attestors/*`. - string attestor = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. An [AttestationOccurrence][grafeas.v1.AttestationOccurrence] to - // be checked that it can be verified by the Attestor. It does not have to be - // an existing entity in Container Analysis. It must otherwise be a valid - // AttestationOccurrence. - grafeas.v1.AttestationOccurrence attestation = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The resource name of the [Note][grafeas.v1.Note] to which the - // containing [Occurrence][grafeas.v1.Occurrence] is associated. - string occurrence_note = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The URI of the artifact (e.g. container image) that is the - // subject of the containing [Occurrence][grafeas.v1.Occurrence]. - string occurrence_resource_uri = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [ValidationHelperV1.ValidateAttestationOccurrence][google.cloud.binaryauthorization.v1.ValidationHelperV1.ValidateAttestationOccurrence]. -message ValidateAttestationOccurrenceResponse { - // The enum returned in the "result" field. - enum Result { - // Unspecified. - RESULT_UNSPECIFIED = 0; - - // The Attestation was able to verified by the Attestor. - VERIFIED = 1; - - // The Attestation was not able to verified by the Attestor. - ATTESTATION_NOT_VERIFIABLE = 2; - } - - // The result of the Attestation validation. - Result result = 1; - - // The reason for denial if the Attestation couldn't be validated. - string denial_reason = 2; -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/clirr-ignored-differences.xml b/proto-google-cloud-binary-authorization-v1beta1/clirr-ignored-differences.xml deleted file mode 100644 index 7563ed7e..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/clirr-ignored-differences.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - 7012 - com/google/cloud/binaryauthorization/v1beta1/*OrBuilder - * get*(*) - - - 7012 - com/google/cloud/binaryauthorization/v1beta1/*OrBuilder - boolean contains*(*) - - - 7012 - com/google/cloud/binaryauthorization/v1beta1/*OrBuilder - boolean has*(*) - - diff --git a/proto-google-cloud-binary-authorization-v1beta1/pom.xml b/proto-google-cloud-binary-authorization-v1beta1/pom.xml deleted file mode 100644 index 8fad34da..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ - - 4.0.0 - com.google.api.grpc - proto-google-cloud-binary-authorization-v1beta1 - 0.7.9-SNAPSHOT - proto-google-cloud-binary-authorization-v1beta1 - Proto library for google-cloud-binary-authorization - - com.google.cloud - google-cloud-binary-authorization-parent - 1.2.9-SNAPSHOT - - - - com.google.protobuf - protobuf-java - - - com.google.api.grpc - proto-google-common-protos - - - com.google.api - api-common - - - com.google.guava - guava - - - - - - - org.codehaus.mojo - flatten-maven-plugin - - - - diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java deleted file mode 100644 index 1a167d21..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRule.java +++ /dev/null @@ -1,1511 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images
- * used in a pod creation request must be attested to by one or more
- * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all
- * pod creations will be denied.
- * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
- * are exempted from admission rules and will never block a pod creation.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionRule} - */ -public final class AdmissionRule extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.AdmissionRule) - AdmissionRuleOrBuilder { - private static final long serialVersionUID = 0L; - // Use AdmissionRule.newBuilder() to construct. - private AdmissionRule(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AdmissionRule() { - evaluationMode_ = 0; - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - enforcementMode_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AdmissionRule(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.class, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder.class); - } - - /** Protobuf enum {@code google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode} */ - public enum EvaluationMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Do not use.
-     * 
- * - * EVALUATION_MODE_UNSPECIFIED = 0; - */ - EVALUATION_MODE_UNSPECIFIED(0), - /** - * - * - *
-     * This rule allows all all pod creations.
-     * 
- * - * ALWAYS_ALLOW = 1; - */ - ALWAYS_ALLOW(1), - /** - * - * - *
-     * This rule allows a pod creation if all the attestors listed in
-     * `require_attestations_by` have valid attestations for all of the
-     * images in the pod spec.
-     * 
- * - * REQUIRE_ATTESTATION = 2; - */ - REQUIRE_ATTESTATION(2), - /** - * - * - *
-     * This rule denies all pod creations.
-     * 
- * - * ALWAYS_DENY = 3; - */ - ALWAYS_DENY(3), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Do not use.
-     * 
- * - * EVALUATION_MODE_UNSPECIFIED = 0; - */ - public static final int EVALUATION_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * This rule allows all all pod creations.
-     * 
- * - * ALWAYS_ALLOW = 1; - */ - public static final int ALWAYS_ALLOW_VALUE = 1; - /** - * - * - *
-     * This rule allows a pod creation if all the attestors listed in
-     * `require_attestations_by` have valid attestations for all of the
-     * images in the pod spec.
-     * 
- * - * REQUIRE_ATTESTATION = 2; - */ - public static final int REQUIRE_ATTESTATION_VALUE = 2; - /** - * - * - *
-     * This rule denies all pod creations.
-     * 
- * - * ALWAYS_DENY = 3; - */ - public static final int ALWAYS_DENY_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 EvaluationMode 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 EvaluationMode forNumber(int value) { - switch (value) { - case 0: - return EVALUATION_MODE_UNSPECIFIED; - case 1: - return ALWAYS_ALLOW; - case 2: - return REQUIRE_ATTESTATION; - case 3: - return ALWAYS_DENY; - 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 EvaluationMode findValueByNumber(int number) { - return EvaluationMode.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.binaryauthorization.v1beta1.AdmissionRule.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final EvaluationMode[] VALUES = values(); - - public static EvaluationMode 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 EvaluationMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode) - } - - /** - * - * - *
-   * Defines the possible actions when a pod creation is denied by an admission
-   * rule.
-   * 
- * - * Protobuf enum {@code google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode} - */ - public enum EnforcementMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Do not use.
-     * 
- * - * ENFORCEMENT_MODE_UNSPECIFIED = 0; - */ - ENFORCEMENT_MODE_UNSPECIFIED(0), - /** - * - * - *
-     * Enforce the admission rule by blocking the pod creation.
-     * 
- * - * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - */ - ENFORCED_BLOCK_AND_AUDIT_LOG(1), - /** - * - * - *
-     * Dryrun mode: Audit logging only.  This will allow the pod creation as if
-     * the admission request had specified break-glass.
-     * 
- * - * DRYRUN_AUDIT_LOG_ONLY = 2; - */ - DRYRUN_AUDIT_LOG_ONLY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Do not use.
-     * 
- * - * ENFORCEMENT_MODE_UNSPECIFIED = 0; - */ - public static final int ENFORCEMENT_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Enforce the admission rule by blocking the pod creation.
-     * 
- * - * ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - */ - public static final int ENFORCED_BLOCK_AND_AUDIT_LOG_VALUE = 1; - /** - * - * - *
-     * Dryrun mode: Audit logging only.  This will allow the pod creation as if
-     * the admission request had specified break-glass.
-     * 
- * - * DRYRUN_AUDIT_LOG_ONLY = 2; - */ - public static final int DRYRUN_AUDIT_LOG_ONLY_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 EnforcementMode 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 EnforcementMode forNumber(int value) { - switch (value) { - case 0: - return ENFORCEMENT_MODE_UNSPECIFIED; - case 1: - return ENFORCED_BLOCK_AND_AUDIT_LOG; - case 2: - return DRYRUN_AUDIT_LOG_ONLY; - 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 EnforcementMode findValueByNumber(int number) { - return EnforcementMode.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.binaryauthorization.v1beta1.AdmissionRule.getDescriptor() - .getEnumTypes() - .get(1); - } - - private static final EnforcementMode[] VALUES = values(); - - public static EnforcementMode 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 EnforcementMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode) - } - - public static final int EVALUATION_MODE_FIELD_NUMBER = 1; - private int evaluationMode_; - /** - * - * - *
-   * Required. How this admission rule will be evaluated.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - @java.lang.Override - public int getEvaluationModeValue() { - return evaluationMode_; - } - /** - * - * - *
-   * Required. How this admission rule will be evaluated.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode - getEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode result = - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode.valueOf( - evaluationMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode.UNRECOGNIZED - : result; - } - - public static final int REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList requireAttestationsBy_; - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { - return requireAttestationsBy_; - } - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - public int getRequireAttestationsByCount() { - return requireAttestationsBy_.size(); - } - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - public java.lang.String getRequireAttestationsBy(int index) { - return requireAttestationsBy_.get(index); - } - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { - return requireAttestationsBy_.getByteString(index); - } - - public static final int ENFORCEMENT_MODE_FIELD_NUMBER = 3; - private int enforcementMode_; - /** - * - * - *
-   * Required. The action when a pod creation is denied by the admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - @java.lang.Override - public int getEnforcementModeValue() { - return enforcementMode_; - } - /** - * - * - *
-   * Required. The action when a pod creation is denied by the admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode - getEnforcementMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode result = - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode.valueOf( - enforcementMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode.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 (evaluationMode_ - != com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode - .EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(1, evaluationMode_); - } - for (int i = 0; i < requireAttestationsBy_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString( - output, 2, requireAttestationsBy_.getRaw(i)); - } - if (enforcementMode_ - != com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode - .ENFORCEMENT_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(3, enforcementMode_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (evaluationMode_ - != com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode - .EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, evaluationMode_); - } - { - int dataSize = 0; - for (int i = 0; i < requireAttestationsBy_.size(); i++) { - dataSize += computeStringSizeNoTag(requireAttestationsBy_.getRaw(i)); - } - size += dataSize; - size += 1 * getRequireAttestationsByList().size(); - } - if (enforcementMode_ - != com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode - .ENFORCEMENT_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, enforcementMode_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.AdmissionRule)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule other = - (com.google.cloud.binaryauthorization.v1beta1.AdmissionRule) obj; - - if (evaluationMode_ != other.evaluationMode_) return false; - if (!getRequireAttestationsByList().equals(other.getRequireAttestationsByList())) return false; - if (enforcementMode_ != other.enforcementMode_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + EVALUATION_MODE_FIELD_NUMBER; - hash = (53 * hash) + evaluationMode_; - if (getRequireAttestationsByCount() > 0) { - hash = (37 * hash) + REQUIRE_ATTESTATIONS_BY_FIELD_NUMBER; - hash = (53 * hash) + getRequireAttestationsByList().hashCode(); - } - hash = (37 * hash) + ENFORCEMENT_MODE_FIELD_NUMBER; - hash = (53 * hash) + enforcementMode_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images
-   * used in a pod creation request must be attested to by one or more
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all
-   * pod creations will be denied.
-   * Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern]
-   * are exempted from admission rules and will never block a pod creation.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionRule} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.AdmissionRule) - com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.class, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - evaluationMode_ = 0; - - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - enforcementMode_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule build() { - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule result = - new com.google.cloud.binaryauthorization.v1beta1.AdmissionRule(this); - int from_bitField0_ = bitField0_; - result.evaluationMode_ = evaluationMode_; - if (((bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = requireAttestationsBy_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.requireAttestationsBy_ = requireAttestationsBy_; - result.enforcementMode_ = enforcementMode_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.AdmissionRule) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.AdmissionRule) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.AdmissionRule other) { - if (other == com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance()) - return this; - if (other.evaluationMode_ != 0) { - setEvaluationModeValue(other.getEvaluationModeValue()); - } - if (!other.requireAttestationsBy_.isEmpty()) { - if (requireAttestationsBy_.isEmpty()) { - requireAttestationsBy_ = other.requireAttestationsBy_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.addAll(other.requireAttestationsBy_); - } - onChanged(); - } - if (other.enforcementMode_ != 0) { - setEnforcementModeValue(other.getEnforcementModeValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - evaluationMode_ = input.readEnum(); - - break; - } // case 8 - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(s); - break; - } // case 18 - case 24: - { - enforcementMode_ = input.readEnum(); - - break; - } // case 24 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private int evaluationMode_ = 0; - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - @java.lang.Override - public int getEvaluationModeValue() { - return evaluationMode_; - } - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for evaluationMode to set. - * @return This builder for chaining. - */ - public Builder setEvaluationModeValue(int value) { - - evaluationMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode - getEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode result = - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode.valueOf( - evaluationMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The evaluationMode to set. - * @return This builder for chaining. - */ - public Builder setEvaluationMode( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode value) { - if (value == null) { - throw new NullPointerException(); - } - - evaluationMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. How this admission rule will be evaluated.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEvaluationMode() { - - evaluationMode_ = 0; - onChanged(); - return this; - } - - private com.google.protobuf.LazyStringList requireAttestationsBy_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureRequireAttestationsByIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - requireAttestationsBy_ = - new com.google.protobuf.LazyStringArrayList(requireAttestationsBy_); - bitField0_ |= 0x00000001; - } - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - public com.google.protobuf.ProtocolStringList getRequireAttestationsByList() { - return requireAttestationsBy_.getUnmodifiableView(); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - public int getRequireAttestationsByCount() { - return requireAttestationsBy_.size(); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - public java.lang.String getRequireAttestationsBy(int index) { - return requireAttestationsBy_.get(index); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - public com.google.protobuf.ByteString getRequireAttestationsByBytes(int index) { - return requireAttestationsBy_.getByteString(index); - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index to set the value at. - * @param value The requireAttestationsBy to set. - * @return This builder for chaining. - */ - public Builder setRequireAttestationsBy(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addRequireAttestationsBy(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param values The requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addAllRequireAttestationsBy(java.lang.Iterable values) { - ensureRequireAttestationsByIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, requireAttestationsBy_); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearRequireAttestationsBy() { - requireAttestationsBy_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. The resource names of the attestors that must attest to
-     * a container image, in the format `projects/*/attestors/*`. Each
-     * attestor must exist before a policy can reference it.  To add an attestor
-     * to a policy the principal issuing the policy change request must be able
-     * to read the attestor resource.
-     * Note: this field must be non-empty when the evaluation_mode field specifies
-     * REQUIRE_ATTESTATION, otherwise it must be empty.
-     * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The bytes of the requireAttestationsBy to add. - * @return This builder for chaining. - */ - public Builder addRequireAttestationsByBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureRequireAttestationsByIsMutable(); - requireAttestationsBy_.add(value); - onChanged(); - return this; - } - - private int enforcementMode_ = 0; - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - @java.lang.Override - public int getEnforcementModeValue() { - return enforcementMode_; - } - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enum numeric value on the wire for enforcementMode to set. - * @return This builder for chaining. - */ - public Builder setEnforcementModeValue(int value) { - - enforcementMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode - getEnforcementMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode result = - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode.valueOf( - enforcementMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @param value The enforcementMode to set. - * @return This builder for chaining. - */ - public Builder setEnforcementMode( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode value) { - if (value == null) { - throw new NullPointerException(); - } - - enforcementMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The action when a pod creation is denied by the admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return This builder for chaining. - */ - public Builder clearEnforcementMode() { - - enforcementMode_ = 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.binaryauthorization.v1beta1.AdmissionRule) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.AdmissionRule) - private static final com.google.cloud.binaryauthorization.v1beta1.AdmissionRule DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.AdmissionRule(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AdmissionRule parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRuleOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRuleOrBuilder.java deleted file mode 100644 index 287060ca..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionRuleOrBuilder.java +++ /dev/null @@ -1,162 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface AdmissionRuleOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.AdmissionRule) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. How this admission rule will be evaluated.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for evaluationMode. - */ - int getEvaluationModeValue(); - /** - * - * - *
-   * Required. How this admission rule will be evaluated.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode evaluation_mode = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The evaluationMode. - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EvaluationMode getEvaluationMode(); - - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return A list containing the requireAttestationsBy. - */ - java.util.List getRequireAttestationsByList(); - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The count of requireAttestationsBy. - */ - int getRequireAttestationsByCount(); - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the element to return. - * @return The requireAttestationsBy at the given index. - */ - java.lang.String getRequireAttestationsBy(int index); - /** - * - * - *
-   * Optional. The resource names of the attestors that must attest to
-   * a container image, in the format `projects/*/attestors/*`. Each
-   * attestor must exist before a policy can reference it.  To add an attestor
-   * to a policy the principal issuing the policy change request must be able
-   * to read the attestor resource.
-   * Note: this field must be non-empty when the evaluation_mode field specifies
-   * REQUIRE_ATTESTATION, otherwise it must be empty.
-   * 
- * - * repeated string require_attestations_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param index The index of the value to return. - * @return The bytes of the requireAttestationsBy at the given index. - */ - com.google.protobuf.ByteString getRequireAttestationsByBytes(int index); - - /** - * - * - *
-   * Required. The action when a pod creation is denied by the admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enum numeric value on the wire for enforcementMode. - */ - int getEnforcementModeValue(); - /** - * - * - *
-   * Required. The action when a pod creation is denied by the admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode enforcement_mode = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The enforcementMode. - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.EnforcementMode getEnforcementMode(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java deleted file mode 100644 index 08a69a26..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPattern.java +++ /dev/null @@ -1,671 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images
- * from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern} - */ -public final class AdmissionWhitelistPattern extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - AdmissionWhitelistPatternOrBuilder { - private static final long serialVersionUID = 0L; - // Use AdmissionWhitelistPattern.newBuilder() to construct. - private AdmissionWhitelistPattern(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AdmissionWhitelistPattern() { - namePattern_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AdmissionWhitelistPattern(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.class, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder.class); - } - - public static final int NAME_PATTERN_FIELD_NUMBER = 1; - private volatile java.lang.Object namePattern_; - /** - * - * - *
-   * An image name pattern to allowlist, in the form `registry/path/to/image`.
-   * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-   * matches subdirectories, i.e., `gcr.io/nginx**` matches
-   * `gcr.io/nginx/image`.
-   * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - @java.lang.Override - public java.lang.String getNamePattern() { - java.lang.Object ref = namePattern_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namePattern_ = s; - return s; - } - } - /** - * - * - *
-   * An image name pattern to allowlist, in the form `registry/path/to/image`.
-   * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-   * matches subdirectories, i.e., `gcr.io/nginx**` matches
-   * `gcr.io/nginx/image`.
-   * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNamePatternBytes() { - java.lang.Object ref = namePattern_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namePattern_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, namePattern_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(namePattern_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, namePattern_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern other = - (com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) obj; - - if (!getNamePattern().equals(other.getNamePattern())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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_PATTERN_FIELD_NUMBER; - hash = (53 * hash) + getNamePattern().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images
-   * from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.class, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - namePattern_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern build() { - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern result = - new com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern(this); - result.namePattern_ = namePattern_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance()) return this; - if (!other.getNamePattern().isEmpty()) { - namePattern_ = other.namePattern_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - namePattern_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object namePattern_ = ""; - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-     * matches subdirectories, i.e., `gcr.io/nginx**` matches
-     * `gcr.io/nginx/image`.
-     * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - public java.lang.String getNamePattern() { - java.lang.Object ref = namePattern_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - namePattern_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-     * matches subdirectories, i.e., `gcr.io/nginx**` matches
-     * `gcr.io/nginx/image`.
-     * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - public com.google.protobuf.ByteString getNamePatternBytes() { - java.lang.Object ref = namePattern_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - namePattern_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-     * matches subdirectories, i.e., `gcr.io/nginx**` matches
-     * `gcr.io/nginx/image`.
-     * 
- * - * string name_pattern = 1; - * - * @param value The namePattern to set. - * @return This builder for chaining. - */ - public Builder setNamePattern(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - namePattern_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-     * matches subdirectories, i.e., `gcr.io/nginx**` matches
-     * `gcr.io/nginx/image`.
-     * 
- * - * string name_pattern = 1; - * - * @return This builder for chaining. - */ - public Builder clearNamePattern() { - - namePattern_ = getDefaultInstance().getNamePattern(); - onChanged(); - return this; - } - /** - * - * - *
-     * An image name pattern to allowlist, in the form `registry/path/to/image`.
-     * This supports a trailing `*` as a wildcard, but this is allowed only in
-     * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-     * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-     * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-     * matches subdirectories, i.e., `gcr.io/nginx**` matches
-     * `gcr.io/nginx/image`.
-     * 
- * - * string name_pattern = 1; - * - * @param value The bytes for namePattern to set. - * @return This builder for chaining. - */ - public Builder setNamePatternBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - namePattern_ = 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.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - private static final com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AdmissionWhitelistPattern parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java deleted file mode 100644 index df874f7e..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AdmissionWhitelistPatternOrBuilder.java +++ /dev/null @@ -1,62 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface AdmissionWhitelistPatternOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * An image name pattern to allowlist, in the form `registry/path/to/image`.
-   * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-   * matches subdirectories, i.e., `gcr.io/nginx**` matches
-   * `gcr.io/nginx/image`.
-   * 
- * - * string name_pattern = 1; - * - * @return The namePattern. - */ - java.lang.String getNamePattern(); - /** - * - * - *
-   * An image name pattern to allowlist, in the form `registry/path/to/image`.
-   * This supports a trailing `*` as a wildcard, but this is allowed only in
-   * text after the `registry/` part. `*` wildcard does not match `/`, i.e.,
-   * `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match
-   * `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which
-   * matches subdirectories, i.e., `gcr.io/nginx**` matches
-   * `gcr.io/nginx/image`.
-   * 
- * - * string name_pattern = 1; - * - * @return The bytes for namePattern. - */ - com.google.protobuf.ByteString getNamePatternBytes(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java deleted file mode 100644 index eb695199..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Attestor.java +++ /dev/null @@ -1,1510 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image
- * artifacts. An existing attestor cannot be modified except where
- * indicated.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Attestor} - */ -public final class Attestor extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.Attestor) - AttestorOrBuilder { - private static final long serialVersionUID = 0L; - // Use Attestor.newBuilder() to construct. - private Attestor(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Attestor() { - name_ = ""; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Attestor(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.Attestor.class, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder.class); - } - - private int attestorTypeCase_ = 0; - private java.lang.Object attestorType_; - - public enum AttestorTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - USER_OWNED_DRYDOCK_NOTE(3), - ATTESTORTYPE_NOT_SET(0); - private final int value; - - private AttestorTypeCase(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 AttestorTypeCase valueOf(int value) { - return forNumber(value); - } - - public static AttestorTypeCase forNumber(int value) { - switch (value) { - case 3: - return USER_OWNED_DRYDOCK_NOTE; - case 0: - return ATTESTORTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public AttestorTypeCase getAttestorTypeCase() { - return AttestorTypeCase.forNumber(attestorTypeCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name, in the format:
-   * `projects/*/attestors/*`. This field may not be updated.
-   * 
- * - * 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, in the format:
-   * `projects/*/attestors/*`. This field may not be updated.
-   * 
- * - * 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 = 6; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Optional. A descriptive comment.  This field may be updated.
-   * The field may be displayed in chooser dialogs.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A descriptive comment.  This field may be updated.
-   * The field may be displayed in chooser dialogs.
-   * 
- * - * string description = 6 [(.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 USER_OWNED_DRYDOCK_NOTE_FIELD_NUMBER = 3; - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return Whether the userOwnedDrydockNote field is set. - */ - @java.lang.Override - public boolean hasUserOwnedDrydockNote() { - return attestorTypeCase_ == 3; - } - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return The userOwnedDrydockNote. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - getUserOwnedDrydockNote() { - if (attestorTypeCase_ == 3) { - return (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_; - } - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.getDefaultInstance(); - } - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder - getUserOwnedDrydockNoteOrBuilder() { - if (attestorTypeCase_ == 3) { - return (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_; - } - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.getDefaultInstance(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 4; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last updated.
-   * 
- * - * .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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (attestorTypeCase_ == 3) { - output.writeMessage( - 3, (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_); - } - if (updateTime_ != null) { - output.writeMessage(4, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (attestorTypeCase_ == 3) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 3, (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.Attestor)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.Attestor other = - (com.google.cloud.binaryauthorization.v1beta1.Attestor) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getAttestorTypeCase().equals(other.getAttestorTypeCase())) return false; - switch (attestorTypeCase_) { - case 3: - if (!getUserOwnedDrydockNote().equals(other.getUserOwnedDrydockNote())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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 (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - switch (attestorTypeCase_) { - case 3: - hash = (37 * hash) + USER_OWNED_DRYDOCK_NOTE_FIELD_NUMBER; - hash = (53 * hash) + getUserOwnedDrydockNote().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.Attestor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image
-   * artifacts. An existing attestor cannot be modified except where
-   * indicated.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Attestor} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.Attestor) - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.Attestor.class, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.Attestor.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - if (userOwnedDrydockNoteBuilder_ != null) { - userOwnedDrydockNoteBuilder_.clear(); - } - if (updateTimeBuilder_ == null) { - updateTime_ = null; - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - attestorTypeCase_ = 0; - attestorType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor build() { - com.google.cloud.binaryauthorization.v1beta1.Attestor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.Attestor result = - new com.google.cloud.binaryauthorization.v1beta1.Attestor(this); - result.name_ = name_; - result.description_ = description_; - if (attestorTypeCase_ == 3) { - if (userOwnedDrydockNoteBuilder_ == null) { - result.attestorType_ = attestorType_; - } else { - result.attestorType_ = userOwnedDrydockNoteBuilder_.build(); - } - } - if (updateTimeBuilder_ == null) { - result.updateTime_ = updateTime_; - } else { - result.updateTime_ = updateTimeBuilder_.build(); - } - result.attestorTypeCase_ = attestorTypeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.Attestor) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.Attestor) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.Attestor other) { - if (other == com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - switch (other.getAttestorTypeCase()) { - case USER_OWNED_DRYDOCK_NOTE: - { - mergeUserOwnedDrydockNote(other.getUserOwnedDrydockNote()); - break; - } - case ATTESTORTYPE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 26: - { - input.readMessage( - getUserOwnedDrydockNoteFieldBuilder().getBuilder(), extensionRegistry); - attestorTypeCase_ = 3; - break; - } // case 26 - case 34: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 34 - case 50: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 50 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int attestorTypeCase_ = 0; - private java.lang.Object attestorType_; - - public AttestorTypeCase getAttestorTypeCase() { - return AttestorTypeCase.forNumber(attestorTypeCase_); - } - - public Builder clearAttestorType() { - attestorTypeCase_ = 0; - attestorType_ = null; - onChanged(); - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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, in the format:
-     * `projects/*/attestors/*`. This field may not be updated.
-     * 
- * - * 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_ = ""; - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment.  This field may be updated.
-     * The field may be displayed in chooser dialogs.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for description to set. - * @return This builder for chaining. - */ - public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder> - userOwnedDrydockNoteBuilder_; - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return Whether the userOwnedDrydockNote field is set. - */ - @java.lang.Override - public boolean hasUserOwnedDrydockNote() { - return attestorTypeCase_ == 3; - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return The userOwnedDrydockNote. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - getUserOwnedDrydockNote() { - if (userOwnedDrydockNoteBuilder_ == null) { - if (attestorTypeCase_ == 3) { - return (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_; - } - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - .getDefaultInstance(); - } else { - if (attestorTypeCase_ == 3) { - return userOwnedDrydockNoteBuilder_.getMessage(); - } - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - .getDefaultInstance(); - } - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - public Builder setUserOwnedDrydockNote( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote value) { - if (userOwnedDrydockNoteBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestorType_ = value; - onChanged(); - } else { - userOwnedDrydockNoteBuilder_.setMessage(value); - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - public Builder setUserOwnedDrydockNote( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder builderForValue) { - if (userOwnedDrydockNoteBuilder_ == null) { - attestorType_ = builderForValue.build(); - onChanged(); - } else { - userOwnedDrydockNoteBuilder_.setMessage(builderForValue.build()); - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - public Builder mergeUserOwnedDrydockNote( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote value) { - if (userOwnedDrydockNoteBuilder_ == null) { - if (attestorTypeCase_ == 3 - && attestorType_ - != com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - .getDefaultInstance()) { - attestorType_ = - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.newBuilder( - (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - attestorType_) - .mergeFrom(value) - .buildPartial(); - } else { - attestorType_ = value; - } - onChanged(); - } else { - if (attestorTypeCase_ == 3) { - userOwnedDrydockNoteBuilder_.mergeFrom(value); - } else { - userOwnedDrydockNoteBuilder_.setMessage(value); - } - } - attestorTypeCase_ = 3; - return this; - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - public Builder clearUserOwnedDrydockNote() { - if (userOwnedDrydockNoteBuilder_ == null) { - if (attestorTypeCase_ == 3) { - attestorTypeCase_ = 0; - attestorType_ = null; - onChanged(); - } - } else { - if (attestorTypeCase_ == 3) { - attestorTypeCase_ = 0; - attestorType_ = null; - } - userOwnedDrydockNoteBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder - getUserOwnedDrydockNoteBuilder() { - return getUserOwnedDrydockNoteFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder - getUserOwnedDrydockNoteOrBuilder() { - if ((attestorTypeCase_ == 3) && (userOwnedDrydockNoteBuilder_ != null)) { - return userOwnedDrydockNoteBuilder_.getMessageOrBuilder(); - } else { - if (attestorTypeCase_ == 3) { - return (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_; - } - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - .getDefaultInstance(); - } - } - /** - * - * - *
-     * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder> - getUserOwnedDrydockNoteFieldBuilder() { - if (userOwnedDrydockNoteBuilder_ == null) { - if (!(attestorTypeCase_ == 3)) { - attestorType_ = - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - .getDefaultInstance(); - } - userOwnedDrydockNoteBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder>( - (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) attestorType_, - getParentForChildren(), - isClean()); - attestorType_ = null; - } - attestorTypeCase_ = 3; - onChanged(); - ; - return userOwnedDrydockNoteBuilder_; - } - - 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 when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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. Time when the attestor was last 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_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.Attestor) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.Attestor) - private static final com.google.cloud.binaryauthorization.v1beta1.Attestor DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.Attestor(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Attestor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Attestor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java deleted file mode 100644 index 429963e8..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorName.java +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import javax.annotation.Generated; - -// AUTO-GENERATED DOCUMENTATION AND CLASS. -@Generated("by gapic-generator-java") -public class AttestorName implements ResourceName { - private static final PathTemplate PROJECT_ATTESTOR = - PathTemplate.createWithoutUrlEncoding("projects/{project}/attestors/{attestor}"); - private volatile Map fieldValuesMap; - private final String project; - private final String attestor; - - @Deprecated - protected AttestorName() { - project = null; - attestor = null; - } - - private AttestorName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - attestor = Preconditions.checkNotNull(builder.getAttestor()); - } - - public String getProject() { - return project; - } - - public String getAttestor() { - return attestor; - } - - public static Builder newBuilder() { - return new Builder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static AttestorName of(String project, String attestor) { - return newBuilder().setProject(project).setAttestor(attestor).build(); - } - - public static String format(String project, String attestor) { - return newBuilder().setProject(project).setAttestor(attestor).build().toString(); - } - - public static AttestorName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - Map matchMap = - PROJECT_ATTESTOR.validatedMatch( - formattedString, "AttestorName.parse: formattedString not in valid format"); - return of(matchMap.get("project"), matchMap.get("attestor")); - } - - 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 (AttestorName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT_ATTESTOR.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 (attestor != null) { - fieldMapBuilder.put("attestor", attestor); - } - fieldValuesMap = fieldMapBuilder.build(); - } - } - } - return fieldValuesMap; - } - - public String getFieldValue(String fieldName) { - return getFieldValuesMap().get(fieldName); - } - - @Override - public String toString() { - return PROJECT_ATTESTOR.instantiate("project", project, "attestor", attestor); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - AttestorName that = ((AttestorName) o); - return Objects.equals(this.project, that.project) - && Objects.equals(this.attestor, that.attestor); - } - return false; - } - - @Override - public int hashCode() { - int h = 1; - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(attestor); - return h; - } - - /** Builder for projects/{project}/attestors/{attestor}. */ - public static class Builder { - private String project; - private String attestor; - - protected Builder() {} - - public String getProject() { - return project; - } - - public String getAttestor() { - return attestor; - } - - public Builder setProject(String project) { - this.project = project; - return this; - } - - public Builder setAttestor(String attestor) { - this.attestor = attestor; - return this; - } - - private Builder(AttestorName attestorName) { - this.project = attestorName.project; - this.attestor = attestorName.attestor; - } - - public AttestorName build() { - return new AttestorName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorOrBuilder.java deleted file mode 100644 index 0144162e..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorOrBuilder.java +++ /dev/null @@ -1,162 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface AttestorOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.Attestor) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name, in the format:
-   * `projects/*/attestors/*`. This field may not be updated.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name, in the format:
-   * `projects/*/attestors/*`. This field may not be updated.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A descriptive comment.  This field may be updated.
-   * The field may be displayed in chooser dialogs.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. A descriptive comment.  This field may be updated.
-   * The field may be displayed in chooser dialogs.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return Whether the userOwnedDrydockNote field is set. - */ - boolean hasUserOwnedDrydockNote(); - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - * - * @return The userOwnedDrydockNote. - */ - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote getUserOwnedDrydockNote(); - /** - * - * - *
-   * A Drydock ATTESTATION_AUTHORITY Note, created by the user.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote user_owned_drydock_note = 3; - * - */ - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder - getUserOwnedDrydockNoteOrBuilder(); - - /** - * - * - *
-   * Output only. Time when the attestor was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. Time when the attestor was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. Time when the attestor was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); - - public com.google.cloud.binaryauthorization.v1beta1.Attestor.AttestorTypeCase - getAttestorTypeCase(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java deleted file mode 100644 index c17aa8eb..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKey.java +++ /dev/null @@ -1,1574 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify
- * attestations signed by this attestor.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AttestorPublicKey} - */ -public final class AttestorPublicKey extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - AttestorPublicKeyOrBuilder { - private static final long serialVersionUID = 0L; - // Use AttestorPublicKey.newBuilder() to construct. - private AttestorPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private AttestorPublicKey() { - comment_ = ""; - id_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new AttestorPublicKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.class, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder.class); - } - - private int publicKeyCase_ = 0; - private java.lang.Object publicKey_; - - public enum PublicKeyCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - ASCII_ARMORED_PGP_PUBLIC_KEY(3), - PKIX_PUBLIC_KEY(5), - PUBLICKEY_NOT_SET(0); - private final int value; - - private PublicKeyCase(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 PublicKeyCase valueOf(int value) { - return forNumber(value); - } - - public static PublicKeyCase forNumber(int value) { - switch (value) { - case 3: - return ASCII_ARMORED_PGP_PUBLIC_KEY; - case 5: - return PKIX_PUBLIC_KEY; - case 0: - return PUBLICKEY_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public PublicKeyCase getPublicKeyCase() { - return PublicKeyCase.forNumber(publicKeyCase_); - } - - public static final int COMMENT_FIELD_NUMBER = 1; - private volatile java.lang.Object comment_; - /** - * - * - *
-   * Optional. A descriptive comment. This field may be updated.
-   * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - @java.lang.Override - public java.lang.String getComment() { - java.lang.Object ref = comment_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comment_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A descriptive comment. This field may be updated.
-   * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - @java.lang.Override - public com.google.protobuf.ByteString getCommentBytes() { - java.lang.Object ref = comment_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - comment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ID_FIELD_NUMBER = 2; - private volatile java.lang.Object id_; - /** - * - * - *
-   * The ID of this public key.
-   * Signatures verified by BinAuthz must include the ID of the public key that
-   * can be used to verify them, and that ID must match the contents of this
-   * field exactly.
-   * Additional restrictions on this field can be imposed based on which public
-   * key type is encapsulated. See the documentation on `public_key` cases below
-   * for details.
-   * 
- * - * string id = 2; - * - * @return The id. - */ - @java.lang.Override - public java.lang.String getId() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } - } - /** - * - * - *
-   * The ID of this public key.
-   * Signatures verified by BinAuthz must include the ID of the public key that
-   * can be used to verify them, and that ID must match the contents of this
-   * field exactly.
-   * Additional restrictions on this field can be imposed based on which public
-   * key type is encapsulated. See the documentation on `public_key` cases below
-   * for details.
-   * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - @java.lang.Override - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER = 3; - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - public boolean hasAsciiArmoredPgpPublicKey() { - return publicKeyCase_ == 3; - } - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - public java.lang.String getAsciiArmoredPgpPublicKey() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof java.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 (publicKeyCase_ == 3) { - publicKey_ = s; - } - return s; - } - } - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (publicKeyCase_ == 3) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PKIX_PUBLIC_KEY_FIELD_NUMBER = 5; - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - @java.lang.Override - public boolean hasPkixPublicKey() { - return publicKeyCase_ == 5; - } - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getPkixPublicKey() { - if (publicKeyCase_ == 5) { - return (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_; - } - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder - getPkixPublicKeyOrBuilder() { - if (publicKeyCase_ == 5) { - return (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_; - } - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, comment_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); - } - if (publicKeyCase_ == 3) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, publicKey_); - } - if (publicKeyCase_ == 5) { - output.writeMessage( - 5, (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(comment_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, comment_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); - } - if (publicKeyCase_ == 3) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, publicKey_); - } - if (publicKeyCase_ == 5) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 5, (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey other = - (com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) obj; - - if (!getComment().equals(other.getComment())) return false; - if (!getId().equals(other.getId())) return false; - if (!getPublicKeyCase().equals(other.getPublicKeyCase())) return false; - switch (publicKeyCase_) { - case 3: - if (!getAsciiArmoredPgpPublicKey().equals(other.getAsciiArmoredPgpPublicKey())) - return false; - break; - case 5: - if (!getPkixPublicKey().equals(other.getPkixPublicKey())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + COMMENT_FIELD_NUMBER; - hash = (53 * hash) + getComment().hashCode(); - hash = (37 * hash) + ID_FIELD_NUMBER; - hash = (53 * hash) + getId().hashCode(); - switch (publicKeyCase_) { - case 3: - hash = (37 * hash) + ASCII_ARMORED_PGP_PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getAsciiArmoredPgpPublicKey().hashCode(); - break; - case 5: - hash = (37 * hash) + PKIX_PUBLIC_KEY_FIELD_NUMBER; - hash = (53 * hash) + getPkixPublicKey().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify
-   * attestations signed by this attestor.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.AttestorPublicKey} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.class, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - comment_ = ""; - - id_ = ""; - - if (pkixPublicKeyBuilder_ != null) { - pkixPublicKeyBuilder_.clear(); - } - publicKeyCase_ = 0; - publicKey_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey build() { - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey result = - new com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey(this); - result.comment_ = comment_; - result.id_ = id_; - if (publicKeyCase_ == 3) { - result.publicKey_ = publicKey_; - } - if (publicKeyCase_ == 5) { - if (pkixPublicKeyBuilder_ == null) { - result.publicKey_ = publicKey_; - } else { - result.publicKey_ = pkixPublicKeyBuilder_.build(); - } - } - result.publicKeyCase_ = publicKeyCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.getDefaultInstance()) - return this; - if (!other.getComment().isEmpty()) { - comment_ = other.comment_; - onChanged(); - } - if (!other.getId().isEmpty()) { - id_ = other.id_; - onChanged(); - } - switch (other.getPublicKeyCase()) { - case ASCII_ARMORED_PGP_PUBLIC_KEY: - { - publicKeyCase_ = 3; - publicKey_ = other.publicKey_; - onChanged(); - break; - } - case PKIX_PUBLIC_KEY: - { - mergePkixPublicKey(other.getPkixPublicKey()); - break; - } - case PUBLICKEY_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - comment_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - id_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - publicKeyCase_ = 3; - publicKey_ = s; - break; - } // case 26 - case 42: - { - input.readMessage(getPkixPublicKeyFieldBuilder().getBuilder(), extensionRegistry); - publicKeyCase_ = 5; - break; - } // case 42 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int publicKeyCase_ = 0; - private java.lang.Object publicKey_; - - public PublicKeyCase getPublicKeyCase() { - return PublicKeyCase.forNumber(publicKeyCase_); - } - - public Builder clearPublicKey() { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - return this; - } - - private java.lang.Object comment_ = ""; - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - public java.lang.String getComment() { - java.lang.Object ref = comment_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - comment_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - public com.google.protobuf.ByteString getCommentBytes() { - java.lang.Object ref = comment_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - comment_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The comment to set. - * @return This builder for chaining. - */ - public Builder setComment(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - comment_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearComment() { - - comment_ = getDefaultInstance().getComment(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment. This field may be updated.
-     * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The bytes for comment to set. - * @return This builder for chaining. - */ - public Builder setCommentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - comment_ = value; - onChanged(); - return this; - } - - private java.lang.Object id_ = ""; - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The id. - */ - public java.lang.String getId() { - java.lang.Object ref = id_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - id_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - public com.google.protobuf.ByteString getIdBytes() { - java.lang.Object ref = id_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - id_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @param value The id to set. - * @return This builder for chaining. - */ - public Builder setId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - id_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @return This builder for chaining. - */ - public Builder clearId() { - - id_ = getDefaultInstance().getId(); - onChanged(); - return this; - } - /** - * - * - *
-     * The ID of this public key.
-     * Signatures verified by BinAuthz must include the ID of the public key that
-     * can be used to verify them, and that ID must match the contents of this
-     * field exactly.
-     * Additional restrictions on this field can be imposed based on which public
-     * key type is encapsulated. See the documentation on `public_key` cases below
-     * for details.
-     * 
- * - * string id = 2; - * - * @param value The bytes for id to set. - * @return This builder for chaining. - */ - public Builder setIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - id_ = value; - onChanged(); - return this; - } - - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - @java.lang.Override - public boolean hasAsciiArmoredPgpPublicKey() { - return publicKeyCase_ == 3; - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - @java.lang.Override - public java.lang.String getAsciiArmoredPgpPublicKey() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - if (publicKeyCase_ == 3) { - publicKey_ = s; - } - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes() { - java.lang.Object ref = ""; - if (publicKeyCase_ == 3) { - ref = publicKey_; - } - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - if (publicKeyCase_ == 3) { - publicKey_ = b; - } - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @param value The asciiArmoredPgpPublicKey to set. - * @return This builder for chaining. - */ - public Builder setAsciiArmoredPgpPublicKey(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - publicKeyCase_ = 3; - publicKey_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return This builder for chaining. - */ - public Builder clearAsciiArmoredPgpPublicKey() { - if (publicKeyCase_ == 3) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - return this; - } - /** - * - * - *
-     * ASCII-armored representation of a PGP public key, as the entire output by
-     * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-     * line endings).
-     * When using this field, `id` should be left blank.  The BinAuthz API
-     * handlers will calculate the ID and fill it in automatically.  BinAuthz
-     * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-     * upper-case hex.  If `id` is provided by the caller, it will be
-     * overwritten by the API-calculated ID.
-     * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @param value The bytes for asciiArmoredPgpPublicKey to set. - * @return This builder for chaining. - */ - public Builder setAsciiArmoredPgpPublicKeyBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - publicKeyCase_ = 3; - publicKey_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder> - pkixPublicKeyBuilder_; - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - @java.lang.Override - public boolean hasPkixPublicKey() { - return publicKeyCase_ == 5; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getPkixPublicKey() { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5) { - return (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_; - } - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } else { - if (publicKeyCase_ == 5) { - return pkixPublicKeyBuilder_.getMessage(); - } - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - public Builder setPkixPublicKey( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey value) { - if (pkixPublicKeyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - publicKey_ = value; - onChanged(); - } else { - pkixPublicKeyBuilder_.setMessage(value); - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - public Builder setPkixPublicKey( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder builderForValue) { - if (pkixPublicKeyBuilder_ == null) { - publicKey_ = builderForValue.build(); - onChanged(); - } else { - pkixPublicKeyBuilder_.setMessage(builderForValue.build()); - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - public Builder mergePkixPublicKey( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey value) { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5 - && publicKey_ - != com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey - .getDefaultInstance()) { - publicKey_ = - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.newBuilder( - (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_) - .mergeFrom(value) - .buildPartial(); - } else { - publicKey_ = value; - } - onChanged(); - } else { - if (publicKeyCase_ == 5) { - pkixPublicKeyBuilder_.mergeFrom(value); - } else { - pkixPublicKeyBuilder_.setMessage(value); - } - } - publicKeyCase_ = 5; - return this; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - public Builder clearPkixPublicKey() { - if (pkixPublicKeyBuilder_ == null) { - if (publicKeyCase_ == 5) { - publicKeyCase_ = 0; - publicKey_ = null; - onChanged(); - } - } else { - if (publicKeyCase_ == 5) { - publicKeyCase_ = 0; - publicKey_ = null; - } - pkixPublicKeyBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder - getPkixPublicKeyBuilder() { - return getPkixPublicKeyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder - getPkixPublicKeyOrBuilder() { - if ((publicKeyCase_ == 5) && (pkixPublicKeyBuilder_ != null)) { - return pkixPublicKeyBuilder_.getMessageOrBuilder(); - } else { - if (publicKeyCase_ == 5) { - return (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_; - } - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } - } - /** - * - * - *
-     * A raw PKIX SubjectPublicKeyInfo format public key.
-     * NOTE: `id` may be explicitly provided by the caller when using this
-     * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-     * blank, a default one will be computed based on the digest of the DER
-     * encoding of the public key.
-     * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder> - getPkixPublicKeyFieldBuilder() { - if (pkixPublicKeyBuilder_ == null) { - if (!(publicKeyCase_ == 5)) { - publicKey_ = - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } - pkixPublicKeyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder>( - (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) publicKey_, - getParentForChildren(), - isClean()); - publicKey_ = null; - } - publicKeyCase_ = 5; - onChanged(); - ; - return pkixPublicKeyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - private static final com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public AttestorPublicKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKeyOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKeyOrBuilder.java deleted file mode 100644 index a4e16b4a..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/AttestorPublicKeyOrBuilder.java +++ /dev/null @@ -1,195 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface AttestorPublicKeyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.AttestorPublicKey) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Optional. A descriptive comment. This field may be updated.
-   * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The comment. - */ - java.lang.String getComment(); - /** - * - * - *
-   * Optional. A descriptive comment. This field may be updated.
-   * 
- * - * string comment = 1 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for comment. - */ - com.google.protobuf.ByteString getCommentBytes(); - - /** - * - * - *
-   * The ID of this public key.
-   * Signatures verified by BinAuthz must include the ID of the public key that
-   * can be used to verify them, and that ID must match the contents of this
-   * field exactly.
-   * Additional restrictions on this field can be imposed based on which public
-   * key type is encapsulated. See the documentation on `public_key` cases below
-   * for details.
-   * 
- * - * string id = 2; - * - * @return The id. - */ - java.lang.String getId(); - /** - * - * - *
-   * The ID of this public key.
-   * Signatures verified by BinAuthz must include the ID of the public key that
-   * can be used to verify them, and that ID must match the contents of this
-   * field exactly.
-   * Additional restrictions on this field can be imposed based on which public
-   * key type is encapsulated. See the documentation on `public_key` cases below
-   * for details.
-   * 
- * - * string id = 2; - * - * @return The bytes for id. - */ - com.google.protobuf.ByteString getIdBytes(); - - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return Whether the asciiArmoredPgpPublicKey field is set. - */ - boolean hasAsciiArmoredPgpPublicKey(); - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The asciiArmoredPgpPublicKey. - */ - java.lang.String getAsciiArmoredPgpPublicKey(); - /** - * - * - *
-   * ASCII-armored representation of a PGP public key, as the entire output by
-   * the command `gpg --export --armor foo@example.com` (either LF or CRLF
-   * line endings).
-   * When using this field, `id` should be left blank.  The BinAuthz API
-   * handlers will calculate the ID and fill it in automatically.  BinAuthz
-   * computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as
-   * upper-case hex.  If `id` is provided by the caller, it will be
-   * overwritten by the API-calculated ID.
-   * 
- * - * string ascii_armored_pgp_public_key = 3; - * - * @return The bytes for asciiArmoredPgpPublicKey. - */ - com.google.protobuf.ByteString getAsciiArmoredPgpPublicKeyBytes(); - - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return Whether the pkixPublicKey field is set. - */ - boolean hasPkixPublicKey(); - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - * - * @return The pkixPublicKey. - */ - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getPkixPublicKey(); - /** - * - * - *
-   * A raw PKIX SubjectPublicKeyInfo format public key.
-   * NOTE: `id` may be explicitly provided by the caller when using this
-   * type of public key, but it MUST be a valid RFC3986 URI. If `id` is left
-   * blank, a default one will be computed based on the digest of the DER
-   * encoding of the public key.
-   * 
- * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey pkix_public_key = 5; - */ - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder getPkixPublicKeyOrBuilder(); - - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.PublicKeyCase - getPublicKeyCase(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java deleted file mode 100644 index d8298681..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationResourcesProto.java +++ /dev/null @@ -1,311 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public final class BinaryAuthorizationResourcesProto { - private BinaryAuthorizationResourcesProto() {} - - 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_binaryauthorization_v1beta1_Policy_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n8google/cloud/binaryauthorization/v1bet" - + "a1/resources.proto\022(google.cloud.binarya" - + "uthorization.v1beta1\032\037google/api/field_b" - + "ehavior.proto\032\031google/api/resource.proto" - + "\032\037google/protobuf/timestamp.proto\"\261\r\n\006Po" - + "licy\022\021\n\004name\030\001 \001(\tB\003\340A\003\022\030\n\013description\030\006" - + " \001(\tB\003\340A\001\022w\n\035global_policy_evaluation_mo" - + "de\030\007 \001(\0162K.google.cloud.binaryauthorizat" - + "ion.v1beta1.Policy.GlobalPolicyEvaluatio" - + "nModeB\003\340A\001\022n\n\034admission_whitelist_patter" - + "ns\030\002 \003(\0132C.google.cloud.binaryauthorizat" - + "ion.v1beta1.AdmissionWhitelistPatternB\003\340" - + "A\001\022q\n\027cluster_admission_rules\030\003 \003(\0132K.go" - + "ogle.cloud.binaryauthorization.v1beta1.P" - + "olicy.ClusterAdmissionRulesEntryB\003\340A\001\022\212\001" - + "\n$kubernetes_namespace_admission_rules\030\n" - + " \003(\0132W.google.cloud.binaryauthorization." - + "v1beta1.Policy.KubernetesNamespaceAdmiss" - + "ionRulesEntryB\003\340A\001\022\225\001\n*kubernetes_servic" - + "e_account_admission_rules\030\010 \003(\0132\\.google" - + ".cloud.binaryauthorization.v1beta1.Polic" - + "y.KubernetesServiceAccountAdmissionRules" - + "EntryB\003\340A\001\022\215\001\n&istio_service_identity_ad" - + "mission_rules\030\t \003(\0132X.google.cloud.binar" - + "yauthorization.v1beta1.Policy.IstioServi" - + "ceIdentityAdmissionRulesEntryB\003\340A\001\022\\\n\026de" - + "fault_admission_rule\030\004 \001(\01327.google.clou" - + "d.binaryauthorization.v1beta1.AdmissionR" - + "uleB\003\340A\002\0224\n\013update_time\030\005 \001(\0132\032.google.p" - + "rotobuf.TimestampB\003\340A\003\032u\n\032ClusterAdmissi" - + "onRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\013" - + "27.google.cloud.binaryauthorization.v1be" - + "ta1.AdmissionRule:\0028\001\032\201\001\n&KubernetesName" - + "spaceAdmissionRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n" - + "\005value\030\002 \001(\01327.google.cloud.binaryauthor" - + "ization.v1beta1.AdmissionRule:\0028\001\032\206\001\n+Ku" - + "bernetesServiceAccountAdmissionRulesEntr" - + "y\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001(\01327.google.c" - + "loud.binaryauthorization.v1beta1.Admissi" - + "onRule:\0028\001\032\202\001\n\'IstioServiceIdentityAdmis" - + "sionRulesEntry\022\013\n\003key\030\001 \001(\t\022F\n\005value\030\002 \001" - + "(\01327.google.cloud.binaryauthorization.v1" - + "beta1.AdmissionRule:\0028\001\"d\n\032GlobalPolicyE" - + "valuationMode\022-\n)GLOBAL_POLICY_EVALUATIO" - + "N_MODE_UNSPECIFIED\020\000\022\n\n\006ENABLE\020\001\022\013\n\007DISA" - + "BLE\020\002:f\352Ac\n)binaryauthorization.googleap" - + "is.com/Policy\022\031projects/{project}/policy" - + "\022\033locations/{location}/policy\"1\n\031Admissi" - + "onWhitelistPattern\022\024\n\014name_pattern\030\001 \001(\t" - + "\"\344\003\n\rAdmissionRule\022d\n\017evaluation_mode\030\001 " - + "\001(\0162F.google.cloud.binaryauthorization.v" - + "1beta1.AdmissionRule.EvaluationModeB\003\340A\002" - + "\022$\n\027require_attestations_by\030\002 \003(\tB\003\340A\001\022f" - + "\n\020enforcement_mode\030\003 \001(\0162G.google.cloud." - + "binaryauthorization.v1beta1.AdmissionRul" - + "e.EnforcementModeB\003\340A\002\"m\n\016EvaluationMode" - + "\022\037\n\033EVALUATION_MODE_UNSPECIFIED\020\000\022\020\n\014ALW" - + "AYS_ALLOW\020\001\022\027\n\023REQUIRE_ATTESTATION\020\002\022\017\n\013" - + "ALWAYS_DENY\020\003\"p\n\017EnforcementMode\022 \n\034ENFO" - + "RCEMENT_MODE_UNSPECIFIED\020\000\022 \n\034ENFORCED_B" - + "LOCK_AND_AUDIT_LOG\020\001\022\031\n\025DRYRUN_AUDIT_LOG" - + "_ONLY\020\002\"\274\002\n\010Attestor\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" - + "\030\n\013description\030\006 \001(\tB\003\340A\001\022a\n\027user_owned_" - + "drydock_note\030\003 \001(\0132>.google.cloud.binary" - + "authorization.v1beta1.UserOwnedDrydockNo" - + "teH\000\0224\n\013update_time\030\004 \001(\0132\032.google.proto" - + "buf.TimestampB\003\340A\003:Y\352AV\n+binaryauthoriza" - + "tion.googleapis.com/Attestor\022\'projects/{" - + "project}/attestors/{attestor}B\017\n\rattesto" - + "r_type\"\271\001\n\024UserOwnedDrydockNote\022\033\n\016note_" - + "reference\030\001 \001(\tB\003\340A\002\022U\n\013public_keys\030\002 \003(" - + "\0132;.google.cloud.binaryauthorization.v1b" - + "eta1.AttestorPublicKeyB\003\340A\001\022-\n delegatio" - + "n_service_account_email\030\003 \001(\tB\003\340A\003\"\304\004\n\rP" - + "kixPublicKey\022\026\n\016public_key_pem\030\001 \001(\t\022g\n\023" - + "signature_algorithm\030\002 \001(\0162J.google.cloud" - + ".binaryauthorization.v1beta1.PkixPublicK" - + "ey.SignatureAlgorithm\"\261\003\n\022SignatureAlgor" - + "ithm\022#\n\037SIGNATURE_ALGORITHM_UNSPECIFIED\020" - + "\000\022\027\n\023RSA_PSS_2048_SHA256\020\001\022\027\n\023RSA_PSS_30" - + "72_SHA256\020\002\022\027\n\023RSA_PSS_4096_SHA256\020\003\022\027\n\023" - + "RSA_PSS_4096_SHA512\020\004\022\036\n\032RSA_SIGN_PKCS1_" - + "2048_SHA256\020\005\022\036\n\032RSA_SIGN_PKCS1_3072_SHA" - + "256\020\006\022\036\n\032RSA_SIGN_PKCS1_4096_SHA256\020\007\022\036\n" - + "\032RSA_SIGN_PKCS1_4096_SHA512\020\010\022\025\n\021ECDSA_P" - + "256_SHA256\020\t\022\027\n\023EC_SIGN_P256_SHA256\020\t\022\025\n" - + "\021ECDSA_P384_SHA384\020\n\022\027\n\023EC_SIGN_P384_SHA" - + "384\020\n\022\025\n\021ECDSA_P521_SHA512\020\013\022\027\n\023EC_SIGN_" - + "P521_SHA512\020\013\032\002\020\001\"\277\001\n\021AttestorPublicKey\022" - + "\024\n\007comment\030\001 \001(\tB\003\340A\001\022\n\n\002id\030\002 \001(\t\022&\n\034asc" - + "ii_armored_pgp_public_key\030\003 \001(\tH\000\022R\n\017pki" - + "x_public_key\030\005 \001(\01327.google.cloud.binary" - + "authorization.v1beta1.PkixPublicKeyH\000B\014\n" - + "\npublic_keyB\267\002\n,com.google.cloud.binarya" - + "uthorization.v1beta1B!BinaryAuthorizatio" - + "nResourcesProtoP\001Z[google.golang.org/gen" - + "proto/googleapis/cloud/binaryauthorizati" - + "on/v1beta1;binaryauthorization\370\001\001\252\002(Goog" - + "le.Cloud.BinaryAuthorization.V1Beta1\312\002(G" - + "oogle\\Cloud\\BinaryAuthorization\\V1beta1\352" - + "\002+Google::Cloud::BinaryAuthorization::V1" - + "beta1b\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_binaryauthorization_v1beta1_Policy_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor, - new java.lang.String[] { - "Name", - "Description", - "GlobalPolicyEvaluationMode", - "AdmissionWhitelistPatterns", - "ClusterAdmissionRules", - "KubernetesNamespaceAdmissionRules", - "KubernetesServiceAccountAdmissionRules", - "IstioServiceIdentityAdmissionRules", - "DefaultAdmissionRule", - "UpdateTime", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor - .getNestedTypes() - .get(2); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor - .getNestedTypes() - .get(3); - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, - new java.lang.String[] { - "Key", "Value", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionWhitelistPattern_descriptor, - new java.lang.String[] { - "NamePattern", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_AdmissionRule_descriptor, - new java.lang.String[] { - "EvaluationMode", "RequireAttestationsBy", "EnforcementMode", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_Attestor_descriptor, - new java.lang.String[] { - "Name", "Description", "UserOwnedDrydockNote", "UpdateTime", "AttestorType", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor, - new java.lang.String[] { - "NoteReference", "PublicKeys", "DelegationServiceAccountEmail", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor, - new java.lang.String[] { - "PublicKeyPem", "SignatureAlgorithm", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_AttestorPublicKey_descriptor, - new java.lang.String[] { - "Comment", "Id", "AsciiArmoredPgpPublicKey", "PkixPublicKey", "PublicKey", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.ResourceProto.resource); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java deleted file mode 100644 index 1837b906..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/BinaryAuthorizationServiceProto.java +++ /dev/null @@ -1,265 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public final class BinaryAuthorizationServiceProto { - private BinaryAuthorizationServiceProto() {} - - 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_binaryauthorization_v1beta1_GetPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\n6google/cloud/binaryauthorization/v1bet" - + "a1/service.proto\022(google.cloud.binaryaut" - + "horization.v1beta1\032\034google/api/annotatio" - + "ns.proto\032\027google/api/client.proto\032\037googl" - + "e/api/field_behavior.proto\032\031google/api/r" - + "esource.proto\0328google/cloud/binaryauthor" - + "ization/v1beta1/resources.proto\032\033google/" - + "protobuf/empty.proto\"S\n\020GetPolicyRequest" - + "\022?\n\004name\030\001 \001(\tB1\340A\002\372A+\n)binaryauthorizat" - + "ion.googleapis.com/Policy\"\\\n\023UpdatePolic" - + "yRequest\022E\n\006policy\030\001 \001(\01320.google.cloud." - + "binaryauthorization.v1beta1.PolicyB\003\340A\002\"" - + "\301\001\n\025CreateAttestorRequest\022C\n\006parent\030\001 \001(" - + "\tB3\340A\002\372A-\n+cloudresourcemanager.googleap" - + "is.com/Project\022\030\n\013attestor_id\030\002 \001(\tB\003\340A\002" - + "\022I\n\010attestor\030\003 \001(\01322.google.cloud.binary" - + "authorization.v1beta1.AttestorB\003\340A\002\"W\n\022G" - + "etAttestorRequest\022A\n\004name\030\001 \001(\tB3\340A\002\372A-\n" - + "+binaryauthorization.googleapis.com/Atte" - + "stor\"b\n\025UpdateAttestorRequest\022I\n\010attesto" - + "r\030\001 \001(\01322.google.cloud.binaryauthorizati" - + "on.v1beta1.AttestorB\003\340A\002\"\202\001\n\024ListAttesto" - + "rsRequest\022C\n\006parent\030\001 \001(\tB3\340A\002\372A-\n+cloud" - + "resourcemanager.googleapis.com/Project\022\021" - + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"w\n" - + "\025ListAttestorsResponse\022E\n\tattestors\030\001 \003(" - + "\01322.google.cloud.binaryauthorization.v1b" - + "eta1.Attestor\022\027\n\017next_page_token\030\002 \001(\t\"Z" - + "\n\025DeleteAttestorRequest\022A\n\004name\030\001 \001(\tB3\340" - + "A\002\372A-\n+binaryauthorization.googleapis.co" - + "m/Attestor\"Y\n\026GetSystemPolicyRequest\022?\n\004" - + "name\030\001 \001(\tB1\340A\002\372A+\n)binaryauthorization." - + "googleapis.com/Policy2\313\013\n BinauthzManage" - + "mentServiceV1Beta1\022\253\001\n\tGetPolicy\022:.googl" - + "e.cloud.binaryauthorization.v1beta1.GetP" - + "olicyRequest\0320.google.cloud.binaryauthor" - + "ization.v1beta1.Policy\"0\202\323\344\223\002#\022!/v1beta1" - + "/{name=projects/*/policy}\332A\004name\022\302\001\n\014Upd" - + "atePolicy\022=.google.cloud.binaryauthoriza" - + "tion.v1beta1.UpdatePolicyRequest\0320.googl" - + "e.cloud.binaryauthorization.v1beta1.Poli" - + "cy\"A\202\323\344\223\0022\032(/v1beta1/{policy.name=projec" - + "ts/*/policy}:\006policy\332A\006policy\022\335\001\n\016Create" - + "Attestor\022?.google.cloud.binaryauthorizat" - + "ion.v1beta1.CreateAttestorRequest\0322.goog" - + "le.cloud.binaryauthorization.v1beta1.Att" - + "estor\"V\202\323\344\223\0022\"&/v1beta1/{parent=projects" - + "/*}/attestors:\010attestor\332A\033parent,attesto" - + "r_id,attestor\022\266\001\n\013GetAttestor\022<.google.c" - + "loud.binaryauthorization.v1beta1.GetAtte" - + "storRequest\0322.google.cloud.binaryauthori" - + "zation.v1beta1.Attestor\"5\202\323\344\223\002(\022&/v1beta" - + "1/{name=projects/*/attestors/*}\332A\004name\022\323" - + "\001\n\016UpdateAttestor\022?.google.cloud.binarya" - + "uthorization.v1beta1.UpdateAttestorReque" - + "st\0322.google.cloud.binaryauthorization.v1" - + "beta1.Attestor\"L\202\323\344\223\002;\032//v1beta1/{attest" - + "or.name=projects/*/attestors/*}:\010attesto" - + "r\332A\010attestor\022\311\001\n\rListAttestors\022>.google." - + "cloud.binaryauthorization.v1beta1.ListAt" - + "testorsRequest\032?.google.cloud.binaryauth" - + "orization.v1beta1.ListAttestorsResponse\"" - + "7\202\323\344\223\002(\022&/v1beta1/{parent=projects/*}/at" - + "testors\332A\006parent\022\240\001\n\016DeleteAttestor\022?.go" - + "ogle.cloud.binaryauthorization.v1beta1.D" - + "eleteAttestorRequest\032\026.google.protobuf.E" - + "mpty\"5\202\323\344\223\002(*&/v1beta1/{name=projects/*/" - + "attestors/*}\332A\004name\032V\312A\"binaryauthorizat" - + "ion.googleapis.com\322A.https://www.googlea" - + "pis.com/auth/cloud-platform2\250\002\n\023SystemPo" - + "licyV1Beta1\022\270\001\n\017GetSystemPolicy\022@.google" - + ".cloud.binaryauthorization.v1beta1.GetSy" - + "stemPolicyRequest\0320.google.cloud.binarya" - + "uthorization.v1beta1.Policy\"1\202\323\344\223\002$\022\"/v1" - + "beta1/{name=locations/*/policy}\332A\004name\032V" - + "\312A\"binaryauthorization.googleapis.com\322A." - + "https://www.googleapis.com/auth/cloud-pl" - + "atformB\265\002\n,com.google.cloud.binaryauthor" - + "ization.v1beta1B\037BinaryAuthorizationServ" - + "iceProtoP\001Z[google.golang.org/genproto/g" - + "oogleapis/cloud/binaryauthorization/v1be" - + "ta1;binaryauthorization\370\001\001\252\002(Google.Clou" - + "d.BinaryAuthorization.V1Beta1\312\002(Google\\C" - + "loud\\BinaryAuthorization\\V1beta1\352\002+Googl" - + "e::Cloud::BinaryAuthorization::V1beta1b\006" - + "proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.api.AnnotationsProto.getDescriptor(), - com.google.api.ClientProto.getDescriptor(), - com.google.api.FieldBehaviorProto.getDescriptor(), - com.google.api.ResourceProto.getDescriptor(), - com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .getDescriptor(), - com.google.protobuf.EmptyProto.getDescriptor(), - }); - internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor, - new java.lang.String[] { - "Policy", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor, - new java.lang.String[] { - "Parent", "AttestorId", "Attestor", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor, - new java.lang.String[] { - "Attestor", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor, - new java.lang.String[] { - "Parent", "PageSize", "PageToken", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor, - new java.lang.String[] { - "Attestors", "NextPageToken", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor, - new java.lang.String[] { - "Name", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor, - new java.lang.String[] { - "Name", - }); - com.google.protobuf.ExtensionRegistry registry = - com.google.protobuf.ExtensionRegistry.newInstance(); - registry.add(com.google.api.ClientProto.defaultHost); - registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); - registry.add(com.google.api.AnnotationsProto.http); - registry.add(com.google.api.ClientProto.methodSignature); - registry.add(com.google.api.ClientProto.oauthScopes); - registry.add(com.google.api.ResourceProto.resourceReference); - com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( - descriptor, registry); - com.google.api.AnnotationsProto.getDescriptor(); - com.google.api.ClientProto.getDescriptor(); - com.google.api.FieldBehaviorProto.getDescriptor(); - com.google.api.ResourceProto.getDescriptor(); - com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto.getDescriptor(); - com.google.protobuf.EmptyProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java deleted file mode 100644 index fd73abe9..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEvent.java +++ /dev/null @@ -1,5810 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Represents an auditing event from Continuous Validation.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent} - */ -public final class ContinuousValidationEvent extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - ContinuousValidationEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContinuousValidationEvent.newBuilder() to construct. - private ContinuousValidationEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ContinuousValidationEvent() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ContinuousValidationEvent(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.Builder.class); - } - - public interface ContinuousValidationPodEventOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The k8s namespace of the Pod.
-     * 
- * - * string pod_namespace = 7; - * - * @return The podNamespace. - */ - java.lang.String getPodNamespace(); - /** - * - * - *
-     * The k8s namespace of the Pod.
-     * 
- * - * string pod_namespace = 7; - * - * @return The bytes for podNamespace. - */ - com.google.protobuf.ByteString getPodNamespaceBytes(); - - /** - * - * - *
-     * The name of the Pod.
-     * 
- * - * string pod = 1; - * - * @return The pod. - */ - java.lang.String getPod(); - /** - * - * - *
-     * The name of the Pod.
-     * 
- * - * string pod = 1; - * - * @return The bytes for pod. - */ - com.google.protobuf.ByteString getPodBytes(); - - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return Whether the deployTime field is set. - */ - boolean hasDeployTime(); - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return The deployTime. - */ - com.google.protobuf.Timestamp getDeployTime(); - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder(); - - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @return Whether the endTime field is set. - */ - boolean hasEndTime(); - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @return The endTime. - */ - com.google.protobuf.Timestamp getEndTime(); - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); - - /** - * - * - *
-     * Auditing verdict for this Pod.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The enum numeric value on the wire for verdict. - */ - int getVerdictValue(); - /** - * - * - *
-     * Auditing verdict for this Pod.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The verdict. - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - getVerdict(); - - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - getImagesList(); - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getImages(int index); - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - int getImagesCount(); - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - java.util.List< - ? extends - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder> - getImagesOrBuilderList(); - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder - getImagesOrBuilder(int index); - } - /** - * - * - *
-   * An auditing event for one Pod.
-   * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent} - */ - public static final class ContinuousValidationPodEvent - extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) - ContinuousValidationPodEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use ContinuousValidationPodEvent.newBuilder() to construct. - private ContinuousValidationPodEvent( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ContinuousValidationPodEvent() { - podNamespace_ = ""; - pod_ = ""; - verdict_ = 0; - images_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ContinuousValidationPodEvent(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder.class); - } - - /** - * - * - *
-     * Audit time policy conformance verdict.
-     * 
- * - * Protobuf enum {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict} - */ - public enum PolicyConformanceVerdict implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-       * We should always have a verdict. This is an error.
-       * 
- * - * POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0; - */ - POLICY_CONFORMANCE_VERDICT_UNSPECIFIED(0), - /** - * - * - *
-       * The pod violates the policy.
-       * 
- * - * VIOLATES_POLICY = 1; - */ - VIOLATES_POLICY(1), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-       * We should always have a verdict. This is an error.
-       * 
- * - * POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0; - */ - public static final int POLICY_CONFORMANCE_VERDICT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-       * The pod violates the policy.
-       * 
- * - * VIOLATES_POLICY = 1; - */ - public static final int VIOLATES_POLICY_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 PolicyConformanceVerdict 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 PolicyConformanceVerdict forNumber(int value) { - switch (value) { - case 0: - return POLICY_CONFORMANCE_VERDICT_UNSPECIFIED; - case 1: - return VIOLATES_POLICY; - 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 PolicyConformanceVerdict findValueByNumber(int number) { - return PolicyConformanceVerdict.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.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final PolicyConformanceVerdict[] VALUES = values(); - - public static PolicyConformanceVerdict 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 PolicyConformanceVerdict(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict) - } - - public interface ImageDetailsOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-       * The name of the image.
-       * 
- * - * string image = 1; - * - * @return The image. - */ - java.lang.String getImage(); - /** - * - * - *
-       * The name of the image.
-       * 
- * - * string image = 1; - * - * @return The bytes for image. - */ - com.google.protobuf.ByteString getImageBytes(); - - /** - * - * - *
-       * The result of the audit for this image.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The enum numeric value on the wire for result. - */ - int getResultValue(); - /** - * - * - *
-       * The result of the audit for this image.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The result. - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - getResult(); - - /** - * - * - *
-       * Description of the above result.
-       * 
- * - * string description = 3; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-       * Description of the above result.
-       * 
- * - * string description = 3; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - } - /** - * - * - *
-     * Container image with auditing details.
-     * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails} - */ - public static final class ImageDetails extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails) - ImageDetailsOrBuilder { - private static final long serialVersionUID = 0L; - // Use ImageDetails.newBuilder() to construct. - private ImageDetails(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ImageDetails() { - image_ = ""; - result_ = 0; - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ImageDetails(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder.class); - } - - /** - * - * - *
-       * Result of the audit.
-       * 
- * - * Protobuf enum {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult} - */ - public enum AuditResult implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-         * Unspecified result. This is an error.
-         * 
- * - * AUDIT_RESULT_UNSPECIFIED = 0; - */ - AUDIT_RESULT_UNSPECIFIED(0), - /** - * - * - *
-         * Image is allowed.
-         * 
- * - * ALLOW = 1; - */ - ALLOW(1), - /** - * - * - *
-         * Image is denied.
-         * 
- * - * DENY = 2; - */ - DENY(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-         * Unspecified result. This is an error.
-         * 
- * - * AUDIT_RESULT_UNSPECIFIED = 0; - */ - public static final int AUDIT_RESULT_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-         * Image is allowed.
-         * 
- * - * ALLOW = 1; - */ - public static final int ALLOW_VALUE = 1; - /** - * - * - *
-         * Image is denied.
-         * 
- * - * DENY = 2; - */ - public static final int DENY_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 AuditResult 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 AuditResult forNumber(int value) { - switch (value) { - case 0: - return AUDIT_RESULT_UNSPECIFIED; - case 1: - return ALLOW; - case 2: - return DENY; - 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 AuditResult findValueByNumber(int number) { - return AuditResult.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.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final AuditResult[] VALUES = values(); - - public static AuditResult 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 AuditResult(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult) - } - - public static final int IMAGE_FIELD_NUMBER = 1; - private volatile java.lang.Object image_; - /** - * - * - *
-       * The name of the image.
-       * 
- * - * string image = 1; - * - * @return The image. - */ - @java.lang.Override - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } - } - /** - * - * - *
-       * The name of the image.
-       * 
- * - * string image = 1; - * - * @return The bytes for image. - */ - @java.lang.Override - public com.google.protobuf.ByteString getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int RESULT_FIELD_NUMBER = 2; - private int result_; - /** - * - * - *
-       * The result of the audit for this image.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The enum numeric value on the wire for result. - */ - @java.lang.Override - public int getResultValue() { - return result_; - } - /** - * - * - *
-       * The result of the audit for this image.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The result. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - getResult() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - result = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.valueOf(result_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.UNRECOGNIZED - : result; - } - - public static final int DESCRIPTION_FIELD_NUMBER = 3; - private volatile java.lang.Object description_; - /** - * - * - *
-       * Description of the above result.
-       * 
- * - * string description = 3; - * - * @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 above result.
-       * 
- * - * string description = 3; - * - * @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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, image_); - } - if (result_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.AUDIT_RESULT_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, result_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(image_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, image_); - } - if (result_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.AUDIT_RESULT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, result_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - other = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails) - obj; - - if (!getImage().equals(other.getImage())) return false; - if (result_ != other.result_) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + IMAGE_FIELD_NUMBER; - hash = (53 * hash) + getImage().hashCode(); - hash = (37 * hash) + RESULT_FIELD_NUMBER; - hash = (53 * hash) + result_; - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseDelimitedFrom( - java.io.InputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-       * Container image with auditing details.
-       * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails) - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - image_ = ""; - - result_ = 0; - - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - build() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - result = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails(this); - result.image_ = image_; - result.result_ = result_; - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.getDefaultInstance()) return this; - if (!other.getImage().isEmpty()) { - image_ = other.image_; - onChanged(); - } - if (other.result_ != 0) { - setResultValue(other.getResultValue()); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - image_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - result_ = input.readEnum(); - - break; - } // case 16 - case 26: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object image_ = ""; - /** - * - * - *
-         * The name of the image.
-         * 
- * - * string image = 1; - * - * @return The image. - */ - public java.lang.String getImage() { - java.lang.Object ref = image_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - image_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-         * The name of the image.
-         * 
- * - * string image = 1; - * - * @return The bytes for image. - */ - public com.google.protobuf.ByteString getImageBytes() { - java.lang.Object ref = image_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - image_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-         * The name of the image.
-         * 
- * - * string image = 1; - * - * @param value The image to set. - * @return This builder for chaining. - */ - public Builder setImage(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - image_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the image.
-         * 
- * - * string image = 1; - * - * @return This builder for chaining. - */ - public Builder clearImage() { - - image_ = getDefaultInstance().getImage(); - onChanged(); - return this; - } - /** - * - * - *
-         * The name of the image.
-         * 
- * - * string image = 1; - * - * @param value The bytes for image to set. - * @return This builder for chaining. - */ - public Builder setImageBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - image_ = value; - onChanged(); - return this; - } - - private int result_ = 0; - /** - * - * - *
-         * The result of the audit for this image.
-         * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The enum numeric value on the wire for result. - */ - @java.lang.Override - public int getResultValue() { - return result_; - } - /** - * - * - *
-         * The result of the audit for this image.
-         * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @param value The enum numeric value on the wire for result to set. - * @return This builder for chaining. - */ - public Builder setResultValue(int value) { - - result_ = value; - onChanged(); - return this; - } - /** - * - * - *
-         * The result of the audit for this image.
-         * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return The result. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - getResult() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - result = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.valueOf(result_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult.UNRECOGNIZED - : result; - } - /** - * - * - *
-         * The result of the audit for this image.
-         * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @param value The result to set. - * @return This builder for chaining. - */ - public Builder setResult( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.AuditResult - value) { - if (value == null) { - throw new NullPointerException(); - } - - result_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-         * The result of the audit for this image.
-         * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails.AuditResult result = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearResult() { - - result_ = 0; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-         * Description of the above result.
-         * 
- * - * string description = 3; - * - * @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 above result.
-         * 
- * - * string description = 3; - * - * @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 above result.
-         * 
- * - * string description = 3; - * - * @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 above result.
-         * 
- * - * string description = 3; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-         * Description of the above result.
-         * 
- * - * string description = 3; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails) - private static final com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ImageDetails parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public static final int POD_NAMESPACE_FIELD_NUMBER = 7; - private volatile java.lang.Object podNamespace_; - /** - * - * - *
-     * The k8s namespace of the Pod.
-     * 
- * - * string pod_namespace = 7; - * - * @return The podNamespace. - */ - @java.lang.Override - public java.lang.String getPodNamespace() { - java.lang.Object ref = podNamespace_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - podNamespace_ = s; - return s; - } - } - /** - * - * - *
-     * The k8s namespace of the Pod.
-     * 
- * - * string pod_namespace = 7; - * - * @return The bytes for podNamespace. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPodNamespaceBytes() { - java.lang.Object ref = podNamespace_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - podNamespace_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int POD_FIELD_NUMBER = 1; - private volatile java.lang.Object pod_; - /** - * - * - *
-     * The name of the Pod.
-     * 
- * - * string pod = 1; - * - * @return The pod. - */ - @java.lang.Override - public java.lang.String getPod() { - java.lang.Object ref = pod_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pod_ = s; - return s; - } - } - /** - * - * - *
-     * The name of the Pod.
-     * 
- * - * string pod = 1; - * - * @return The bytes for pod. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPodBytes() { - java.lang.Object ref = pod_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pod_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DEPLOY_TIME_FIELD_NUMBER = 2; - private com.google.protobuf.Timestamp deployTime_; - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return Whether the deployTime field is set. - */ - @java.lang.Override - public boolean hasDeployTime() { - return deployTime_ != null; - } - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return The deployTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getDeployTime() { - return deployTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : deployTime_; - } - /** - * - * - *
-     * Deploy time of the Pod from k8s.
-     * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - return getDeployTime(); - } - - public static final int END_TIME_FIELD_NUMBER = 3; - private com.google.protobuf.Timestamp endTime_; - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @return Whether the endTime field is set. - */ - @java.lang.Override - public boolean hasEndTime() { - return endTime_ != null; - } - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @return The endTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getEndTime() { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - /** - * - * - *
-     * Termination time of the Pod from k8s, or nothing if still running.
-     * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - @java.lang.Override - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - return getEndTime(); - } - - public static final int VERDICT_FIELD_NUMBER = 4; - private int verdict_; - /** - * - * - *
-     * Auditing verdict for this Pod.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The enum numeric value on the wire for verdict. - */ - @java.lang.Override - public int getVerdictValue() { - return verdict_; - } - /** - * - * - *
-     * Auditing verdict for this Pod.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The verdict. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - getVerdict() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - result = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict.valueOf(verdict_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict.UNRECOGNIZED - : result; - } - - public static final int IMAGES_FIELD_NUMBER = 5; - private java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - images_; - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - @java.lang.Override - public java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - getImagesList() { - return images_; - } - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - @java.lang.Override - public java.util.List< - ? extends - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder> - getImagesOrBuilderList() { - return images_; - } - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - @java.lang.Override - public int getImagesCount() { - return images_.size(); - } - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getImages(int index) { - return images_.get(index); - } - /** - * - * - *
-     * List of images with auditing details.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder - getImagesOrBuilder(int index) { - return images_.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, pod_); - } - if (deployTime_ != null) { - output.writeMessage(2, getDeployTime()); - } - if (endTime_ != null) { - output.writeMessage(3, getEndTime()); - } - if (verdict_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - .POLICY_CONFORMANCE_VERDICT_UNSPECIFIED - .getNumber()) { - output.writeEnum(4, verdict_); - } - for (int i = 0; i < images_.size(); i++) { - output.writeMessage(5, images_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 7, podNamespace_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, pod_); - } - if (deployTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDeployTime()); - } - if (endTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEndTime()); - } - if (verdict_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - .POLICY_CONFORMANCE_VERDICT_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, verdict_); - } - for (int i = 0; i < images_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, images_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(podNamespace_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, podNamespace_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - other = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - obj; - - if (!getPodNamespace().equals(other.getPodNamespace())) return false; - if (!getPod().equals(other.getPod())) return false; - if (hasDeployTime() != other.hasDeployTime()) return false; - if (hasDeployTime()) { - if (!getDeployTime().equals(other.getDeployTime())) return false; - } - if (hasEndTime() != other.hasEndTime()) return false; - if (hasEndTime()) { - if (!getEndTime().equals(other.getEndTime())) return false; - } - if (verdict_ != other.verdict_) return false; - if (!getImagesList().equals(other.getImagesList())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + POD_NAMESPACE_FIELD_NUMBER; - hash = (53 * hash) + getPodNamespace().hashCode(); - hash = (37 * hash) + POD_FIELD_NUMBER; - hash = (53 * hash) + getPod().hashCode(); - if (hasDeployTime()) { - hash = (37 * hash) + DEPLOY_TIME_FIELD_NUMBER; - hash = (53 * hash) + getDeployTime().hashCode(); - } - if (hasEndTime()) { - hash = (37 * hash) + END_TIME_FIELD_NUMBER; - hash = (53 * hash) + getEndTime().hashCode(); - } - hash = (37 * hash) + VERDICT_FIELD_NUMBER; - hash = (53 * hash) + verdict_; - if (getImagesCount() > 0) { - hash = (37 * hash) + IMAGES_FIELD_NUMBER; - hash = (53 * hash) + getImagesList().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 auditing event for one Pod.
-     * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - podNamespace_ = ""; - - pod_ = ""; - - if (deployTimeBuilder_ == null) { - deployTime_ = null; - } else { - deployTime_ = null; - deployTimeBuilder_ = null; - } - if (endTimeBuilder_ == null) { - endTime_ = null; - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - verdict_ = 0; - - if (imagesBuilder_ == null) { - images_ = java.util.Collections.emptyList(); - } else { - images_ = null; - imagesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - build() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - result = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent(this); - int from_bitField0_ = bitField0_; - result.podNamespace_ = podNamespace_; - result.pod_ = pod_; - if (deployTimeBuilder_ == null) { - result.deployTime_ = deployTime_; - } else { - result.deployTime_ = deployTimeBuilder_.build(); - } - if (endTimeBuilder_ == null) { - result.endTime_ = endTime_; - } else { - result.endTime_ = endTimeBuilder_.build(); - } - result.verdict_ = verdict_; - if (imagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - images_ = java.util.Collections.unmodifiableList(images_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.images_ = images_; - } else { - result.images_ = imagesBuilder_.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.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance()) return this; - if (!other.getPodNamespace().isEmpty()) { - podNamespace_ = other.podNamespace_; - onChanged(); - } - if (!other.getPod().isEmpty()) { - pod_ = other.pod_; - onChanged(); - } - if (other.hasDeployTime()) { - mergeDeployTime(other.getDeployTime()); - } - if (other.hasEndTime()) { - mergeEndTime(other.getEndTime()); - } - if (other.verdict_ != 0) { - setVerdictValue(other.getVerdictValue()); - } - if (imagesBuilder_ == null) { - if (!other.images_.isEmpty()) { - if (images_.isEmpty()) { - images_ = other.images_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureImagesIsMutable(); - images_.addAll(other.images_); - } - onChanged(); - } - } else { - if (!other.images_.isEmpty()) { - if (imagesBuilder_.isEmpty()) { - imagesBuilder_.dispose(); - imagesBuilder_ = null; - images_ = other.images_; - bitField0_ = (bitField0_ & ~0x00000001); - imagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getImagesFieldBuilder() - : null; - } else { - imagesBuilder_.addAllMessages(other.images_); - } - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - pod_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - input.readMessage(getDeployTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 18 - case 26: - { - input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - case 32: - { - verdict_ = input.readEnum(); - - break; - } // case 32 - case 42: - { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - m = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.parser(), - extensionRegistry); - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - images_.add(m); - } else { - imagesBuilder_.addMessage(m); - } - break; - } // case 42 - case 58: - { - podNamespace_ = input.readStringRequireUtf8(); - - break; - } // case 58 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object podNamespace_ = ""; - /** - * - * - *
-       * The k8s namespace of the Pod.
-       * 
- * - * string pod_namespace = 7; - * - * @return The podNamespace. - */ - public java.lang.String getPodNamespace() { - java.lang.Object ref = podNamespace_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - podNamespace_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The k8s namespace of the Pod.
-       * 
- * - * string pod_namespace = 7; - * - * @return The bytes for podNamespace. - */ - public com.google.protobuf.ByteString getPodNamespaceBytes() { - java.lang.Object ref = podNamespace_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - podNamespace_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The k8s namespace of the Pod.
-       * 
- * - * string pod_namespace = 7; - * - * @param value The podNamespace to set. - * @return This builder for chaining. - */ - public Builder setPodNamespace(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - podNamespace_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The k8s namespace of the Pod.
-       * 
- * - * string pod_namespace = 7; - * - * @return This builder for chaining. - */ - public Builder clearPodNamespace() { - - podNamespace_ = getDefaultInstance().getPodNamespace(); - onChanged(); - return this; - } - /** - * - * - *
-       * The k8s namespace of the Pod.
-       * 
- * - * string pod_namespace = 7; - * - * @param value The bytes for podNamespace to set. - * @return This builder for chaining. - */ - public Builder setPodNamespaceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - podNamespace_ = value; - onChanged(); - return this; - } - - private java.lang.Object pod_ = ""; - /** - * - * - *
-       * The name of the Pod.
-       * 
- * - * string pod = 1; - * - * @return The pod. - */ - public java.lang.String getPod() { - java.lang.Object ref = pod_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pod_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The name of the Pod.
-       * 
- * - * string pod = 1; - * - * @return The bytes for pod. - */ - public com.google.protobuf.ByteString getPodBytes() { - java.lang.Object ref = pod_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pod_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The name of the Pod.
-       * 
- * - * string pod = 1; - * - * @param value The pod to set. - * @return This builder for chaining. - */ - public Builder setPod(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pod_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the Pod.
-       * 
- * - * string pod = 1; - * - * @return This builder for chaining. - */ - public Builder clearPod() { - - pod_ = getDefaultInstance().getPod(); - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the Pod.
-       * 
- * - * string pod = 1; - * - * @param value The bytes for pod to set. - * @return This builder for chaining. - */ - public Builder setPodBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pod_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.Timestamp deployTime_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - deployTimeBuilder_; - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return Whether the deployTime field is set. - */ - public boolean hasDeployTime() { - return deployTimeBuilder_ != null || deployTime_ != null; - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - * - * @return The deployTime. - */ - public com.google.protobuf.Timestamp getDeployTime() { - if (deployTimeBuilder_ == null) { - return deployTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deployTime_; - } else { - return deployTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - deployTime_ = value; - onChanged(); - } else { - deployTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder setDeployTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (deployTimeBuilder_ == null) { - deployTime_ = builderForValue.build(); - onChanged(); - } else { - deployTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder mergeDeployTime(com.google.protobuf.Timestamp value) { - if (deployTimeBuilder_ == null) { - if (deployTime_ != null) { - deployTime_ = - com.google.protobuf.Timestamp.newBuilder(deployTime_) - .mergeFrom(value) - .buildPartial(); - } else { - deployTime_ = value; - } - onChanged(); - } else { - deployTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public Builder clearDeployTime() { - if (deployTimeBuilder_ == null) { - deployTime_ = null; - onChanged(); - } else { - deployTime_ = null; - deployTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.Timestamp.Builder getDeployTimeBuilder() { - - onChanged(); - return getDeployTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - public com.google.protobuf.TimestampOrBuilder getDeployTimeOrBuilder() { - if (deployTimeBuilder_ != null) { - return deployTimeBuilder_.getMessageOrBuilder(); - } else { - return deployTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : deployTime_; - } - } - /** - * - * - *
-       * Deploy time of the Pod from k8s.
-       * 
- * - * .google.protobuf.Timestamp deploy_time = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getDeployTimeFieldBuilder() { - if (deployTimeBuilder_ == null) { - deployTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getDeployTime(), getParentForChildren(), isClean()); - deployTime_ = null; - } - return deployTimeBuilder_; - } - - 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_; - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @return Whether the endTime field is set. - */ - public boolean hasEndTime() { - return endTimeBuilder_ != null || endTime_ != null; - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - * - * @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(); - } - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - 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; - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (endTimeBuilder_ == null) { - endTime_ = builderForValue.build(); - onChanged(); - } else { - endTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - 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; - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public Builder clearEndTime() { - if (endTimeBuilder_ == null) { - endTime_ = null; - onChanged(); - } else { - endTime_ = null; - endTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { - - onChanged(); - return getEndTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { - if (endTimeBuilder_ != null) { - return endTimeBuilder_.getMessageOrBuilder(); - } else { - return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; - } - } - /** - * - * - *
-       * Termination time of the Pod from k8s, or nothing if still running.
-       * 
- * - * .google.protobuf.Timestamp end_time = 3; - */ - 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 int verdict_ = 0; - /** - * - * - *
-       * Auditing verdict for this Pod.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The enum numeric value on the wire for verdict. - */ - @java.lang.Override - public int getVerdictValue() { - return verdict_; - } - /** - * - * - *
-       * Auditing verdict for this Pod.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @param value The enum numeric value on the wire for verdict to set. - * @return This builder for chaining. - */ - public Builder setVerdictValue(int value) { - - verdict_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * Auditing verdict for this Pod.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return The verdict. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - getVerdict() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - result = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict.valueOf(verdict_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict.UNRECOGNIZED - : result; - } - /** - * - * - *
-       * Auditing verdict for this Pod.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @param value The verdict to set. - * @return This builder for chaining. - */ - public Builder setVerdict( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.PolicyConformanceVerdict - value) { - if (value == null) { - throw new NullPointerException(); - } - - verdict_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-       * Auditing verdict for this Pod.
-       * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.PolicyConformanceVerdict verdict = 4; - * - * - * @return This builder for chaining. - */ - public Builder clearVerdict() { - - verdict_ = 0; - onChanged(); - return this; - } - - private java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - images_ = java.util.Collections.emptyList(); - - private void ensureImagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - images_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails>(images_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder> - imagesBuilder_; - - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - getImagesList() { - if (imagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(images_); - } else { - return imagesBuilder_.getMessageList(); - } - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public int getImagesCount() { - if (imagesBuilder_ == null) { - return images_.size(); - } else { - return imagesBuilder_.getCount(); - } - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - getImages(int index) { - if (imagesBuilder_ == null) { - return images_.get(index); - } else { - return imagesBuilder_.getMessage(index); - } - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder setImages( - int index, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - value) { - if (imagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImagesIsMutable(); - images_.set(index, value); - onChanged(); - } else { - imagesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder setImages( - int index, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - builderForValue) { - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - images_.set(index, builderForValue.build()); - onChanged(); - } else { - imagesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder addImages( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - value) { - if (imagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImagesIsMutable(); - images_.add(value); - onChanged(); - } else { - imagesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder addImages( - int index, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails - value) { - if (imagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureImagesIsMutable(); - images_.add(index, value); - onChanged(); - } else { - imagesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder addImages( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - builderForValue) { - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - images_.add(builderForValue.build()); - onChanged(); - } else { - imagesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder addImages( - int index, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - builderForValue) { - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - images_.add(index, builderForValue.build()); - onChanged(); - } else { - imagesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder addAllImages( - java.lang.Iterable< - ? extends - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails> - values) { - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, images_); - onChanged(); - } else { - imagesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder clearImages() { - if (imagesBuilder_ == null) { - images_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - imagesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public Builder removeImages(int index) { - if (imagesBuilder_ == null) { - ensureImagesIsMutable(); - images_.remove(index); - onChanged(); - } else { - imagesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - getImagesBuilder(int index) { - return getImagesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder - getImagesOrBuilder(int index) { - if (imagesBuilder_ == null) { - return images_.get(index); - } else { - return imagesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public java.util.List< - ? extends - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder> - getImagesOrBuilderList() { - if (imagesBuilder_ != null) { - return imagesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(images_); - } - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - addImagesBuilder() { - return getImagesFieldBuilder() - .addBuilder( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.getDefaultInstance()); - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder - addImagesBuilder(int index) { - return getImagesFieldBuilder() - .addBuilder( - index, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.getDefaultInstance()); - } - /** - * - * - *
-       * List of images with auditing details.
-       * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent.ImageDetails images = 5; - * - */ - public java.util.List< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder> - getImagesBuilderList() { - return getImagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder> - getImagesFieldBuilder() { - if (imagesBuilder_ == null) { - imagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetails.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.ImageDetailsOrBuilder>( - images_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - images_ = null; - } - return imagesBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent) - private static final com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContinuousValidationPodEvent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface UnsupportedPolicyEventOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * A description of the unsupported policy.
-     * 
- * - * string description = 1; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-     * A description of the unsupported policy.
-     * 
- * - * string description = 1; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - } - /** - * - * - *
-   * An event describing that the project policy is unsupported by CV.
-   * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent} - */ - public static final class UnsupportedPolicyEvent extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent) - UnsupportedPolicyEventOrBuilder { - private static final long serialVersionUID = 0L; - // Use UnsupportedPolicyEvent.newBuilder() to construct. - private UnsupportedPolicyEvent(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UnsupportedPolicyEvent() { - description_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UnsupportedPolicyEvent(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder.class); - } - - public static final int DESCRIPTION_FIELD_NUMBER = 1; - private volatile java.lang.Object description_; - /** - * - * - *
-     * A description of the unsupported policy.
-     * 
- * - * string description = 1; - * - * @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 description of the unsupported policy.
-     * 
- * - * string description = 1; - * - * @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; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj - instanceof - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent - other = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - obj; - - if (!getDescription().equals(other.getDescription())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 event describing that the project policy is unsupported by CV.
-     * 
- * - * Protobuf type {@code - * google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent) - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - description_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - build() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - result = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent(this); - result.description_ = description_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, - java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other - instanceof - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance()) return this; - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object description_ = ""; - /** - * - * - *
-       * A description of the unsupported policy.
-       * 
- * - * string description = 1; - * - * @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 description of the unsupported policy.
-       * 
- * - * string description = 1; - * - * @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 description of the unsupported policy.
-       * 
- * - * string description = 1; - * - * @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 description of the unsupported policy.
-       * 
- * - * string description = 1; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-       * A description of the unsupported policy.
-       * 
- * - * string description = 1; - * - * @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; - } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent) - private static final com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UnsupportedPolicyEvent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - private int eventTypeCase_ = 0; - private java.lang.Object eventType_; - - public enum EventTypeCase - implements - com.google.protobuf.Internal.EnumLite, - com.google.protobuf.AbstractMessage.InternalOneOfEnum { - POD_EVENT(1), - UNSUPPORTED_POLICY_EVENT(2), - EVENTTYPE_NOT_SET(0); - private final int value; - - private EventTypeCase(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 EventTypeCase valueOf(int value) { - return forNumber(value); - } - - public static EventTypeCase forNumber(int value) { - switch (value) { - case 1: - return POD_EVENT; - case 2: - return UNSUPPORTED_POLICY_EVENT; - case 0: - return EVENTTYPE_NOT_SET; - default: - return null; - } - } - - public int getNumber() { - return this.value; - } - }; - - public EventTypeCase getEventTypeCase() { - return EventTypeCase.forNumber(eventTypeCase_); - } - - public static final int POD_EVENT_FIELD_NUMBER = 1; - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return Whether the podEvent field is set. - */ - @java.lang.Override - public boolean hasPodEvent() { - return eventTypeCase_ == 1; - } - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return The podEvent. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getPodEvent() { - if (eventTypeCase_ == 1) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder - getPodEventOrBuilder() { - if (eventTypeCase_ == 1) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - - public static final int UNSUPPORTED_POLICY_EVENT_FIELD_NUMBER = 2; - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return Whether the unsupportedPolicyEvent field is set. - */ - @java.lang.Override - public boolean hasUnsupportedPolicyEvent() { - return eventTypeCase_ == 2; - } - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return The unsupportedPolicyEvent. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - getUnsupportedPolicyEvent() { - if (eventTypeCase_ == 2) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder - getUnsupportedPolicyEventOrBuilder() { - if (eventTypeCase_ == 2) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.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 (eventTypeCase_ == 1) { - output.writeMessage( - 1, - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_); - } - if (eventTypeCase_ == 2) { - output.writeMessage( - 2, - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (eventTypeCase_ == 1) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 1, - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_); - } - if (eventTypeCase_ == 2) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent other = - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) obj; - - if (!getEventTypeCase().equals(other.getEventTypeCase())) return false; - switch (eventTypeCase_) { - case 1: - if (!getPodEvent().equals(other.getPodEvent())) return false; - break; - case 2: - if (!getUnsupportedPolicyEvent().equals(other.getUnsupportedPolicyEvent())) return false; - break; - case 0: - default: - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - switch (eventTypeCase_) { - case 1: - hash = (37 * hash) + POD_EVENT_FIELD_NUMBER; - hash = (53 * hash) + getPodEvent().hashCode(); - break; - case 2: - hash = (37 * hash) + UNSUPPORTED_POLICY_EVENT_FIELD_NUMBER; - hash = (53 * hash) + getUnsupportedPolicyEvent().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Represents an auditing event from Continuous Validation.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEventOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.class, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (podEventBuilder_ != null) { - podEventBuilder_.clear(); - } - if (unsupportedPolicyEventBuilder_ != null) { - unsupportedPolicyEventBuilder_.clear(); - } - eventTypeCase_ = 0; - eventType_ = null; - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationLoggingProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent build() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent result = - buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent result = - new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent(this); - if (eventTypeCase_ == 1) { - if (podEventBuilder_ == null) { - result.eventType_ = eventType_; - } else { - result.eventType_ = podEventBuilder_.build(); - } - } - if (eventTypeCase_ == 2) { - if (unsupportedPolicyEventBuilder_ == null) { - result.eventType_ = eventType_; - } else { - result.eventType_ = unsupportedPolicyEventBuilder_.build(); - } - } - result.eventTypeCase_ = eventTypeCase_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .getDefaultInstance()) return this; - switch (other.getEventTypeCase()) { - case POD_EVENT: - { - mergePodEvent(other.getPodEvent()); - break; - } - case UNSUPPORTED_POLICY_EVENT: - { - mergeUnsupportedPolicyEvent(other.getUnsupportedPolicyEvent()); - break; - } - case EVENTTYPE_NOT_SET: - { - break; - } - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getPodEventFieldBuilder().getBuilder(), extensionRegistry); - eventTypeCase_ = 1; - break; - } // case 10 - case 18: - { - input.readMessage( - getUnsupportedPolicyEventFieldBuilder().getBuilder(), extensionRegistry); - eventTypeCase_ = 2; - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int eventTypeCase_ = 0; - private java.lang.Object eventType_; - - public EventTypeCase getEventTypeCase() { - return EventTypeCase.forNumber(eventTypeCase_); - } - - public Builder clearEventType() { - eventTypeCase_ = 0; - eventType_ = null; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder> - podEventBuilder_; - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return Whether the podEvent field is set. - */ - @java.lang.Override - public boolean hasPodEvent() { - return eventTypeCase_ == 1; - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return The podEvent. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getPodEvent() { - if (podEventBuilder_ == null) { - if (eventTypeCase_ == 1) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } else { - if (eventTypeCase_ == 1) { - return podEventBuilder_.getMessage(); - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - public Builder setPodEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - value) { - if (podEventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventType_ = value; - onChanged(); - } else { - podEventBuilder_.setMessage(value); - } - eventTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - public Builder setPodEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder - builderForValue) { - if (podEventBuilder_ == null) { - eventType_ = builderForValue.build(); - onChanged(); - } else { - podEventBuilder_.setMessage(builderForValue.build()); - } - eventTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - public Builder mergePodEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - value) { - if (podEventBuilder_ == null) { - if (eventTypeCase_ == 1 - && eventType_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance()) { - eventType_ = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.newBuilder( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_) - .mergeFrom(value) - .buildPartial(); - } else { - eventType_ = value; - } - onChanged(); - } else { - if (eventTypeCase_ == 1) { - podEventBuilder_.mergeFrom(value); - } else { - podEventBuilder_.setMessage(value); - } - } - eventTypeCase_ = 1; - return this; - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - public Builder clearPodEvent() { - if (podEventBuilder_ == null) { - if (eventTypeCase_ == 1) { - eventTypeCase_ = 0; - eventType_ = null; - onChanged(); - } - } else { - if (eventTypeCase_ == 1) { - eventTypeCase_ = 0; - eventType_ = null; - } - podEventBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder - getPodEventBuilder() { - return getPodEventFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder - getPodEventOrBuilder() { - if ((eventTypeCase_ == 1) && (podEventBuilder_ != null)) { - return podEventBuilder_.getMessageOrBuilder(); - } else { - if (eventTypeCase_ == 1) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - } - /** - * - * - *
-     * Pod event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder> - getPodEventFieldBuilder() { - if (podEventBuilder_ == null) { - if (!(eventTypeCase_ == 1)) { - eventType_ = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.getDefaultInstance(); - } - podEventBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder>( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent) - eventType_, - getParentForChildren(), - isClean()); - eventType_ = null; - } - eventTypeCase_ = 1; - onChanged(); - ; - return podEventBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder> - unsupportedPolicyEventBuilder_; - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return Whether the unsupportedPolicyEvent field is set. - */ - @java.lang.Override - public boolean hasUnsupportedPolicyEvent() { - return eventTypeCase_ == 2; - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return The unsupportedPolicyEvent. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - getUnsupportedPolicyEvent() { - if (unsupportedPolicyEventBuilder_ == null) { - if (eventTypeCase_ == 2) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } else { - if (eventTypeCase_ == 2) { - return unsupportedPolicyEventBuilder_.getMessage(); - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - public Builder setUnsupportedPolicyEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - value) { - if (unsupportedPolicyEventBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - eventType_ = value; - onChanged(); - } else { - unsupportedPolicyEventBuilder_.setMessage(value); - } - eventTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - public Builder setUnsupportedPolicyEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder - builderForValue) { - if (unsupportedPolicyEventBuilder_ == null) { - eventType_ = builderForValue.build(); - onChanged(); - } else { - unsupportedPolicyEventBuilder_.setMessage(builderForValue.build()); - } - eventTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - public Builder mergeUnsupportedPolicyEvent( - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent - value) { - if (unsupportedPolicyEventBuilder_ == null) { - if (eventTypeCase_ == 2 - && eventType_ - != com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance()) { - eventType_ = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.newBuilder( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_) - .mergeFrom(value) - .buildPartial(); - } else { - eventType_ = value; - } - onChanged(); - } else { - if (eventTypeCase_ == 2) { - unsupportedPolicyEventBuilder_.mergeFrom(value); - } else { - unsupportedPolicyEventBuilder_.setMessage(value); - } - } - eventTypeCase_ = 2; - return this; - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - public Builder clearUnsupportedPolicyEvent() { - if (unsupportedPolicyEventBuilder_ == null) { - if (eventTypeCase_ == 2) { - eventTypeCase_ = 0; - eventType_ = null; - onChanged(); - } - } else { - if (eventTypeCase_ == 2) { - eventTypeCase_ = 0; - eventType_ = null; - } - unsupportedPolicyEventBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder - getUnsupportedPolicyEventBuilder() { - return getUnsupportedPolicyEventFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder - getUnsupportedPolicyEventOrBuilder() { - if ((eventTypeCase_ == 2) && (unsupportedPolicyEventBuilder_ != null)) { - return unsupportedPolicyEventBuilder_.getMessageOrBuilder(); - } else { - if (eventTypeCase_ == 2) { - return (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_; - } - return com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } - } - /** - * - * - *
-     * Unsupported policy event.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder> - getUnsupportedPolicyEventFieldBuilder() { - if (unsupportedPolicyEventBuilder_ == null) { - if (!(eventTypeCase_ == 2)) { - eventType_ = - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.getDefaultInstance(); - } - unsupportedPolicyEventBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent.Builder, - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder>( - (com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEvent) - eventType_, - getParentForChildren(), - isClean()); - eventType_ = null; - } - eventTypeCase_ = 2; - onChanged(); - ; - return unsupportedPolicyEventBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - private static final com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ContinuousValidationEvent parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEventOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEventOrBuilder.java deleted file mode 100644 index 815dcdd8..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationEventOrBuilder.java +++ /dev/null @@ -1,117 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface ContinuousValidationEventOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return Whether the podEvent field is set. - */ - boolean hasPodEvent(); - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - * - * @return The podEvent. - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEvent - getPodEvent(); - /** - * - * - *
-   * Pod event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.ContinuousValidationPodEvent pod_event = 1; - * - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .ContinuousValidationPodEventOrBuilder - getPodEventOrBuilder(); - - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return Whether the unsupportedPolicyEvent field is set. - */ - boolean hasUnsupportedPolicyEvent(); - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - * - * @return The unsupportedPolicyEvent. - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent - getUnsupportedPolicyEvent(); - /** - * - * - *
-   * Unsupported policy event.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.UnsupportedPolicyEvent unsupported_policy_event = 2; - * - */ - com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent - .UnsupportedPolicyEventOrBuilder - getUnsupportedPolicyEventOrBuilder(); - - public com.google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent.EventTypeCase - getEventTypeCase(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java deleted file mode 100644 index 8c94cdeb..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ContinuousValidationLoggingProto.java +++ /dev/null @@ -1,144 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public final class ContinuousValidationLoggingProto { - private ContinuousValidationLoggingProto() {} - - 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_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { - return descriptor; - } - - private static com.google.protobuf.Descriptors.FileDescriptor descriptor; - - static { - java.lang.String[] descriptorData = { - "\nLgoogle/cloud/binaryauthorization/v1bet" - + "a1/continuous_validation_logging.proto\022(" - + "google.cloud.binaryauthorization.v1beta1" - + "\032\037google/protobuf/timestamp.proto\"\337\010\n\031Co" - + "ntinuousValidationEvent\022u\n\tpod_event\030\001 \001" - + "(\0132`.google.cloud.binaryauthorization.v1" - + "beta1.ContinuousValidationEvent.Continuo" - + "usValidationPodEventH\000\022~\n\030unsupported_po" - + "licy_event\030\002 \001(\0132Z.google.cloud.binaryau" - + "thorization.v1beta1.ContinuousValidation" - + "Event.UnsupportedPolicyEventH\000\032\215\006\n\034Conti" - + "nuousValidationPodEvent\022\025\n\rpod_namespace" - + "\030\007 \001(\t\022\013\n\003pod\030\001 \001(\t\022/\n\013deploy_time\030\002 \001(\013" - + "2\032.google.protobuf.Timestamp\022,\n\010end_time" - + "\030\003 \001(\0132\032.google.protobuf.Timestamp\022\212\001\n\007v" - + "erdict\030\004 \001(\0162y.google.cloud.binaryauthor" - + "ization.v1beta1.ContinuousValidationEven" - + "t.ContinuousValidationPodEvent.PolicyCon" - + "formanceVerdict\022}\n\006images\030\005 \003(\0132m.google" - + ".cloud.binaryauthorization.v1beta1.Conti" - + "nuousValidationEvent.ContinuousValidatio" - + "nPodEvent.ImageDetails\032\200\002\n\014ImageDetails\022" - + "\r\n\005image\030\001 \001(\t\022\211\001\n\006result\030\002 \001(\0162y.google" - + ".cloud.binaryauthorization.v1beta1.Conti" - + "nuousValidationEvent.ContinuousValidatio" - + "nPodEvent.ImageDetails.AuditResult\022\023\n\013de" - + "scription\030\003 \001(\t\"@\n\013AuditResult\022\034\n\030AUDIT_" - + "RESULT_UNSPECIFIED\020\000\022\t\n\005ALLOW\020\001\022\010\n\004DENY\020" - + "\002\"[\n\030PolicyConformanceVerdict\022*\n&POLICY_" - + "CONFORMANCE_VERDICT_UNSPECIFIED\020\000\022\023\n\017VIO" - + "LATES_POLICY\020\001\032-\n\026UnsupportedPolicyEvent" - + "\022\023\n\013description\030\001 \001(\tB\014\n\nevent_typeB\266\002\n," - + "com.google.cloud.binaryauthorization.v1b" - + "eta1B ContinuousValidationLoggingProtoP\001" - + "Z[google.golang.org/genproto/googleapis/" - + "cloud/binaryauthorization/v1beta1;binary" - + "authorization\370\001\001\252\002(Google.Cloud.BinaryAu" - + "thorization.V1Beta1\312\002(Google\\Cloud\\Binar" - + "yAuthorization\\V1beta1\352\002+Google::Cloud::" - + "BinaryAuthorization::V1beta1b\006proto3" - }; - descriptor = - com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( - descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - com.google.protobuf.TimestampProto.getDescriptor(), - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor, - new java.lang.String[] { - "PodEvent", "UnsupportedPolicyEvent", "EventType", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor, - new java.lang.String[] { - "PodNamespace", "Pod", "DeployTime", "EndTime", "Verdict", "Images", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_descriptor - .getNestedTypes() - .get(0); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_ContinuousValidationPodEvent_ImageDetails_descriptor, - new java.lang.String[] { - "Image", "Result", "Description", - }); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor = - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_descriptor - .getNestedTypes() - .get(1); - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_binaryauthorization_v1beta1_ContinuousValidationEvent_UnsupportedPolicyEvent_descriptor, - new java.lang.String[] { - "Description", - }); - com.google.protobuf.TimestampProto.getDescriptor(); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java deleted file mode 100644 index 44344114..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequest.java +++ /dev/null @@ -1,1134 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.CreateAttestor][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest} - */ -public final class CreateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - CreateAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use CreateAttestorRequest.newBuilder() to construct. - private CreateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private CreateAttestorRequest() { - parent_ = ""; - attestorId_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new CreateAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * - * 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 ATTESTOR_ID_FIELD_NUMBER = 2; - private volatile java.lang.Object attestorId_; - /** - * - * - *
-   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-   * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - @java.lang.Override - public java.lang.String getAttestorId() { - java.lang.Object ref = attestorId_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestorId_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-   * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAttestorIdBytes() { - java.lang.Object ref = attestorId_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestorId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int ATTESTOR_FIELD_NUMBER = 3; - private com.google.cloud.binaryauthorization.v1beta1.Attestor attestor_; - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - @java.lang.Override - public boolean hasAttestor() { - return attestor_ != null; - } - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder() { - return getAttestor(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attestorId_); - } - if (attestor_ != null) { - output.writeMessage(3, getAttestor()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attestorId_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, attestorId_); - } - if (attestor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getAttestor()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest other = - (com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (!getAttestorId().equals(other.getAttestorId())) return false; - if (hasAttestor() != other.hasAttestor()) return false; - if (hasAttestor()) { - if (!getAttestor().equals(other.getAttestor())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + ATTESTOR_ID_FIELD_NUMBER; - hash = (53 * hash) + getAttestorId().hashCode(); - if (hasAttestor()) { - hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; - hash = (53 * hash) + getAttestor().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.CreateAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - parent_ = ""; - - attestorId_ = ""; - - if (attestorBuilder_ == null) { - attestor_ = null; - } else { - attestor_ = null; - attestorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_CreateAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest build() { - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest result = - new com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest(this); - result.parent_ = parent_; - result.attestorId_ = attestorId_; - if (attestorBuilder_ == null) { - result.attestor_ = attestor_; - } else { - result.attestor_ = attestorBuilder_.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.binaryauthorization.v1beta1.CreateAttestorRequest) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - .getDefaultInstance()) return this; - if (!other.getParent().isEmpty()) { - parent_ = other.parent_; - onChanged(); - } - if (!other.getAttestorId().isEmpty()) { - attestorId_ = other.attestorId_; - onChanged(); - } - if (other.hasAttestor()) { - mergeAttestor(other.getAttestor()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - attestorId_ = input.readStringRequireUtf8(); - - break; - } // case 18 - case 26: - { - input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * - * 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 of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * - * 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 attestorId_ = ""; - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - public java.lang.String getAttestorId() { - java.lang.Object ref = attestorId_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attestorId_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - public com.google.protobuf.ByteString getAttestorIdBytes() { - java.lang.Object ref = attestorId_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attestorId_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The attestorId to set. - * @return This builder for chaining. - */ - public Builder setAttestorId(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attestorId_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAttestorId() { - - attestorId_ = getDefaultInstance().getAttestorId(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-     * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for attestorId to set. - * @return This builder for chaining. - */ - public Builder setAttestorIdBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attestorId_ = value; - onChanged(); - return this; - } - - private com.google.cloud.binaryauthorization.v1beta1.Attestor attestor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - attestorBuilder_; - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - public boolean hasAttestor() { - return attestorBuilder_ != null || attestor_ != null; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { - if (attestorBuilder_ == null) { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } else { - return attestorBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestor_ = value; - onChanged(); - } else { - attestorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder builderForValue) { - if (attestorBuilder_ == null) { - attestor_ = builderForValue.build(); - onChanged(); - } else { - attestorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorBuilder_ == null) { - if (attestor_ != null) { - attestor_ = - com.google.cloud.binaryauthorization.v1beta1.Attestor.newBuilder(attestor_) - .mergeFrom(value) - .buildPartial(); - } else { - attestor_ = value; - } - onChanged(); - } else { - attestorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearAttestor() { - if (attestorBuilder_ == null) { - attestor_ = null; - onChanged(); - } else { - attestor_ = null; - attestorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder getAttestorBuilder() { - - onChanged(); - return getAttestorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder() { - if (attestorBuilder_ != null) { - return attestorBuilder_.getMessageOrBuilder(); - } else { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } - } - /** - * - * - *
-     * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-     * in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - getAttestorFieldBuilder() { - if (attestorBuilder_ == null) { - attestorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder>( - getAttestor(), getParentForChildren(), isClean()); - attestor_ = null; - } - return attestorBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public CreateAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java deleted file mode 100644 index 27d1e3af..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/CreateAttestorRequestOrBuilder.java +++ /dev/null @@ -1,126 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface CreateAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-   * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attestorId. - */ - java.lang.String getAttestorId(); - /** - * - * - *
-   * Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID.
-   * 
- * - * string attestor_id = 2 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attestorId. - */ - com.google.protobuf.ByteString getAttestorIdBytes(); - - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - boolean hasAttestor(); - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor(); - /** - * - * - *
-   * Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name,
-   * in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 3 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java deleted file mode 100644 index a96b1554..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequest.java +++ /dev/null @@ -1,647 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.DeleteAttestor][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest} - */ -public final class DeleteAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) - DeleteAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use DeleteAttestorRequest.newBuilder() to construct. - private DeleteAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private DeleteAttestorRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new DeleteAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest other = - (com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.DeleteAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_DeleteAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest build() { - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest result = - new com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest(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.binaryauthorization.v1beta1.DeleteAttestorRequest) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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.binaryauthorization.v1beta1.DeleteAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public DeleteAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java deleted file mode 100644 index a9d45ba3..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/DeleteAttestorRequestOrBuilder.java +++ /dev/null @@ -1,56 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface DeleteAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java deleted file mode 100644 index b5a88c02..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequest.java +++ /dev/null @@ -1,643 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.GetAttestor][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetAttestorRequest} - */ -public final class GetAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) - GetAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetAttestorRequest.newBuilder() to construct. - private GetAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetAttestorRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest other = - (com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.GetAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetAttestorRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest build() { - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest result = - new com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest(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.binaryauthorization.v1beta1.GetAttestorRequest) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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 [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-     * `projects/*/attestors/*`.
-     * 
- * - * - * 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.binaryauthorization.v1beta1.GetAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java deleted file mode 100644 index 62655936..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetAttestorRequestOrBuilder.java +++ /dev/null @@ -1,56 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface GetAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.GetAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format
-   * `projects/*/attestors/*`.
-   * 
- * - * - * 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-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java deleted file mode 100644 index 87fb4ec5..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequest.java +++ /dev/null @@ -1,640 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.GetPolicy][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetPolicyRequest} - */ -public final class GetPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) - GetPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetPolicyRequest.newBuilder() to construct. - private GetPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-   * in the format `projects/*/policy`.
-   * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-   * in the format `projects/*/policy`.
-   * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest other = - (com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.GetPolicy][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest build() { - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest result = - new com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest(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.binaryauthorization.v1beta1.GetPolicyRequest) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-     * in the format `projects/*/policy`.
-     * 
- * - * - * 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.binaryauthorization.v1beta1.GetPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java deleted file mode 100644 index 1efb80fd..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetPolicyRequestOrBuilder.java +++ /dev/null @@ -1,56 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface GetPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.GetPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-   * in the format `projects/*/policy`.
-   * 
- * - * - * 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve,
-   * in the format `projects/*/policy`.
-   * 
- * - * - * 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-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java deleted file mode 100644 index ec220816..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequest.java +++ /dev/null @@ -1,647 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request to read the current system policy.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest} - */ -public final class GetSystemPolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) - GetSystemPolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use GetSystemPolicyRequest.newBuilder() to construct. - private GetSystemPolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private GetSystemPolicyRequest() { - name_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new GetSystemPolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.Builder.class); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Required. The resource name, in the format `locations/*/policy`.
-   * Note that the system policy is not associated with a project.
-   * 
- * - * - * 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, in the format `locations/*/policy`.
-   * Note that the system policy is not associated with a project.
-   * 
- * - * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest other = - (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) obj; - - if (!getName().equals(other.getName())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 read the current system policy.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_GetSystemPolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest build() { - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest result = - new com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest(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.binaryauthorization.v1beta1.GetSystemPolicyRequest) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - .getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Required. The resource name, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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, in the format `locations/*/policy`.
-     * Note that the system policy is not associated with a project.
-     * 
- * - * - * 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.binaryauthorization.v1beta1.GetSystemPolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public GetSystemPolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java deleted file mode 100644 index 72b25d79..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/GetSystemPolicyRequestOrBuilder.java +++ /dev/null @@ -1,56 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface GetSystemPolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name, in the format `locations/*/policy`.
-   * Note that the system policy is not associated with a project.
-   * 
- * - * - * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Required. The resource name, in the format `locations/*/policy`.
-   * Note that the system policy is not associated with a project.
-   * 
- * - * - * 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-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java deleted file mode 100644 index 529f432d..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequest.java +++ /dev/null @@ -1,932 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.ListAttestors][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest} - */ -public final class ListAttestorsRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) - ListAttestorsRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAttestorsRequest.newBuilder() to construct. - private ListAttestorsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAttestorsRequest() { - parent_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAttestorsRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.class, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.Builder.class); - } - - public static final int PARENT_FIELD_NUMBER = 1; - private volatile java.lang.Object parent_; - /** - * - * - *
-   * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-   * 
- * - * - * 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 project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-   * 
- * - * - * 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_; - /** - * - * - *
-   * Requested page size. The server may return fewer results than requested. If
-   * unspecified, the server will pick an appropriate default.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * A token identifying a page of results the server should return. Typically,
-   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-   * from the previous call to the `ListAttestors` method.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token identifying a page of results the server should return. Typically,
-   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-   * from the previous call to the `ListAttestors` method.
-   * 
- * - * 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); - } - if (pageSize_ != 0) { - output.writeInt32(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest other = - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) obj; - - if (!getParent().equals(other.getParent())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.ListAttestors][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.class, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @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.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest build() { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest result = - new com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest(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.binaryauthorization.v1beta1.ListAttestorsRequest) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.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.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - parent_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - pageSize_ = input.readInt32(); - - break; - } // case 16 - case 26: - { - pageToken_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object parent_ = ""; - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - public java.lang.String getParent() { - java.lang.Object ref = parent_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - parent_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - public com.google.protobuf.ByteString getParentBytes() { - java.lang.Object ref = parent_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - parent_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The parent to set. - * @return This builder for chaining. - */ - public Builder setParent(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - parent_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return This builder for chaining. - */ - public Builder clearParent() { - - parent_ = getDefaultInstance().getParent(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The resource name of the project associated with the
-     * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-     * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @param value The bytes for parent to set. - * @return This builder for chaining. - */ - public Builder setParentBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - parent_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Requested page size. The server may return fewer results than requested. If
-     * unspecified, the server will pick an appropriate default.
-     * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Requested page size. The server may return fewer results than requested. If
-     * unspecified, the server will pick an appropriate default.
-     * 
- * - * int32 page_size = 2; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Requested page size. The server may return fewer results than requested. If
-     * unspecified, the server will pick an appropriate default.
-     * 
- * - * int32 page_size = 2; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token identifying a page of results the server should return. Typically,
-     * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-     * from the previous call to the `ListAttestors` method.
-     * 
- * - * 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.binaryauthorization.v1beta1.ListAttestorsRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttestorsRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java deleted file mode 100644 index 24f1dfb9..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsRequestOrBuilder.java +++ /dev/null @@ -1,99 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface ListAttestorsRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The parent. - */ - java.lang.String getParent(); - /** - * - * - *
-   * Required. The resource name of the project associated with the
-   * [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`.
-   * 
- * - * - * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } - * - * - * @return The bytes for parent. - */ - com.google.protobuf.ByteString getParentBytes(); - - /** - * - * - *
-   * Requested page size. The server may return fewer results than requested. If
-   * unspecified, the server will pick an appropriate default.
-   * 
- * - * int32 page_size = 2; - * - * @return The pageSize. - */ - int getPageSize(); - - /** - * - * - *
-   * A token identifying a page of results the server should return. Typically,
-   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-   * from the previous call to the `ListAttestors` method.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * A token identifying a page of results the server should return. Typically,
-   * this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned
-   * from the previous call to the `ListAttestors` method.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java deleted file mode 100644 index c25792be..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponse.java +++ /dev/null @@ -1,1142 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Response message for [BinauthzManagementService.ListAttestors][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse} - */ -public final class ListAttestorsResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - ListAttestorsResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListAttestorsResponse.newBuilder() to construct. - private ListAttestorsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListAttestorsResponse() { - attestors_ = java.util.Collections.emptyList(); - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListAttestorsResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.class, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.Builder.class); - } - - public static final int ATTESTORS_FIELD_NUMBER = 1; - private java.util.List attestors_; - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - @java.lang.Override - public java.util.List getAttestorsList() { - return attestors_; - } - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - @java.lang.Override - public java.util.List - getAttestorsOrBuilderList() { - return attestors_; - } - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - @java.lang.Override - public int getAttestorsCount() { - return attestors_.size(); - } - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestors(int index) { - return attestors_.get(index); - } - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorsOrBuilder( - int index) { - return attestors_.get(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-   * `ListAttestors` method to retrieve the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-   * `ListAttestors` method to retrieve the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - for (int i = 0; i < attestors_.size(); i++) { - output.writeMessage(1, attestors_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < attestors_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, attestors_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse other = - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) obj; - - if (!getAttestorsList().equals(other.getAttestorsList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAttestorsCount() > 0) { - hash = (37 * hash) + ATTESTORS_FIELD_NUMBER; - hash = (53 * hash) + getAttestorsList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [BinauthzManagementService.ListAttestors][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.class, - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (attestorsBuilder_ == null) { - attestors_ = java.util.Collections.emptyList(); - } else { - attestors_ = null; - attestorsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_ListAttestorsResponse_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse build() { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse result = - new com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse(this); - int from_bitField0_ = bitField0_; - if (attestorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - attestors_ = java.util.Collections.unmodifiableList(attestors_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.attestors_ = attestors_; - } else { - result.attestors_ = attestorsBuilder_.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.binaryauthorization.v1beta1.ListAttestorsResponse) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - .getDefaultInstance()) return this; - if (attestorsBuilder_ == null) { - if (!other.attestors_.isEmpty()) { - if (attestors_.isEmpty()) { - attestors_ = other.attestors_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAttestorsIsMutable(); - attestors_.addAll(other.attestors_); - } - onChanged(); - } - } else { - if (!other.attestors_.isEmpty()) { - if (attestorsBuilder_.isEmpty()) { - attestorsBuilder_.dispose(); - attestorsBuilder_ = null; - attestors_ = other.attestors_; - bitField0_ = (bitField0_ & ~0x00000001); - attestorsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAttestorsFieldBuilder() - : null; - } else { - attestorsBuilder_.addAllMessages(other.attestors_); - } - } - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.binaryauthorization.v1beta1.Attestor m = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.Attestor.parser(), - extensionRegistry); - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(m); - } else { - attestorsBuilder_.addMessage(m); - } - break; - } // case 10 - case 18: - { - nextPageToken_ = input.readStringRequireUtf8(); - - break; - } // case 18 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.util.List attestors_ = - java.util.Collections.emptyList(); - - private void ensureAttestorsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - attestors_ = - new java.util.ArrayList( - attestors_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - attestorsBuilder_; - - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public java.util.List - getAttestorsList() { - if (attestorsBuilder_ == null) { - return java.util.Collections.unmodifiableList(attestors_); - } else { - return attestorsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public int getAttestorsCount() { - if (attestorsBuilder_ == null) { - return attestors_.size(); - } else { - return attestorsBuilder_.getCount(); - } - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestors(int index) { - if (attestorsBuilder_ == null) { - return attestors_.get(index); - } else { - return attestorsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder setAttestors( - int index, com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.set(index, value); - onChanged(); - } else { - attestorsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder setAttestors( - int index, com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.set(index, builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder addAttestors(com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.add(value); - onChanged(); - } else { - attestorsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder addAttestors( - int index, com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAttestorsIsMutable(); - attestors_.add(index, value); - onChanged(); - } else { - attestorsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder addAttestors( - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder addAttestors( - int index, com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder builderForValue) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.add(index, builderForValue.build()); - onChanged(); - } else { - attestorsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder addAllAttestors( - java.lang.Iterable - values) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attestors_); - onChanged(); - } else { - attestorsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder clearAttestors() { - if (attestorsBuilder_ == null) { - attestors_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - attestorsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public Builder removeAttestors(int index) { - if (attestorsBuilder_ == null) { - ensureAttestorsIsMutable(); - attestors_.remove(index); - onChanged(); - } else { - attestorsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder getAttestorsBuilder( - int index) { - return getAttestorsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorsOrBuilder( - int index) { - if (attestorsBuilder_ == null) { - return attestors_.get(index); - } else { - return attestorsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public java.util.List - getAttestorsOrBuilderList() { - if (attestorsBuilder_ != null) { - return attestorsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(attestors_); - } - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder addAttestorsBuilder() { - return getAttestorsFieldBuilder() - .addBuilder(com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance()); - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder addAttestorsBuilder( - int index) { - return getAttestorsFieldBuilder() - .addBuilder( - index, com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance()); - } - /** - * - * - *
-     * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-     * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - public java.util.List - getAttestorsBuilderList() { - return getAttestorsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - getAttestorsFieldBuilder() { - if (attestorsBuilder_ == null) { - attestorsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder>( - attestors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - attestors_ = null; - } - return attestorsBuilder_; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - nextPageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A token to retrieve the next page of results. Pass this value in the
-     * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-     * `ListAttestors` method to retrieve the next page of results.
-     * 
- * - * string next_page_token = 2; - * - * @param value The bytes for nextPageToken to set. - * @return This builder for chaining. - */ - public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - nextPageToken_ = value; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - private static final com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListAttestorsResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java deleted file mode 100644 index 7f6a8a9b..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ListAttestorsResponseOrBuilder.java +++ /dev/null @@ -1,106 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface ListAttestorsResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - java.util.List getAttestorsList(); - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestors(int index); - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - int getAttestorsCount(); - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - java.util.List - getAttestorsOrBuilderList(); - /** - * - * - *
-   * The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor].
-   * 
- * - * repeated .google.cloud.binaryauthorization.v1beta1.Attestor attestors = 1; - */ - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorsOrBuilder(int index); - - /** - * - * - *
-   * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-   * `ListAttestors` method to retrieve the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A token to retrieve the next page of results. Pass this value in the
-   * [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the
-   * `ListAttestors` method to retrieve the next page of results.
-   * 
- * - * string next_page_token = 2; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java deleted file mode 100644 index 6244a124..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKey.java +++ /dev/null @@ -1,1283 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * A public key in the PkixPublicKey format (see
- * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
- * Public keys of this type are typically textually encoded using the PEM
- * format.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.PkixPublicKey} - */ -public final class PkixPublicKey extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.PkixPublicKey) - PkixPublicKeyOrBuilder { - private static final long serialVersionUID = 0L; - // Use PkixPublicKey.newBuilder() to construct. - private PkixPublicKey(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PkixPublicKey() { - publicKeyPem_ = ""; - signatureAlgorithm_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PkixPublicKey(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.class, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder.class); - } - - /** - * - * - *
-   * Represents a signature algorithm and other information necessary to verify
-   * signatures with a given public key.
-   * This is based primarily on the public key types supported by Tink's
-   * PemKeyType, which is in turn based on KMS's supported signing algorithms.
-   * See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz
-   * might support additional public key types independently of Tink and/or KMS.
-   * 
- * - * Protobuf enum {@code google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm} - */ - public enum SignatureAlgorithm implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Not specified.
-     * 
- * - * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - SIGNATURE_ALGORITHM_UNSPECIFIED(0, 0), - /** - * - * - *
-     * RSASSA-PSS 2048 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_2048_SHA256 = 1; - */ - RSA_PSS_2048_SHA256(1, 1), - /** - * - * - *
-     * RSASSA-PSS 3072 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_3072_SHA256 = 2; - */ - RSA_PSS_3072_SHA256(2, 2), - /** - * - * - *
-     * RSASSA-PSS 4096 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_4096_SHA256 = 3; - */ - RSA_PSS_4096_SHA256(3, 3), - /** - * - * - *
-     * RSASSA-PSS 4096 bit key with a SHA512 digest.
-     * 
- * - * RSA_PSS_4096_SHA512 = 4; - */ - RSA_PSS_4096_SHA512(4, 4), - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - RSA_SIGN_PKCS1_2048_SHA256(5, 5), - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - RSA_SIGN_PKCS1_3072_SHA256(6, 6), - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - RSA_SIGN_PKCS1_4096_SHA256(7, 7), - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
-     * 
- * - * RSA_SIGN_PKCS1_4096_SHA512 = 8; - */ - RSA_SIGN_PKCS1_4096_SHA512(8, 8), - /** - * - * - *
-     * ECDSA on the NIST P-256 curve with a SHA256 digest.
-     * 
- * - * ECDSA_P256_SHA256 = 9; - */ - ECDSA_P256_SHA256(9, 9), - /** - * - * - *
-     * ECDSA on the NIST P-384 curve with a SHA384 digest.
-     * 
- * - * ECDSA_P384_SHA384 = 10; - */ - ECDSA_P384_SHA384(11, 10), - /** - * - * - *
-     * ECDSA on the NIST P-521 curve with a SHA512 digest.
-     * 
- * - * ECDSA_P521_SHA512 = 11; - */ - ECDSA_P521_SHA512(13, 11), - UNRECOGNIZED(-1, -1), - ; - - /** - * - * - *
-     * ECDSA on the NIST P-256 curve with a SHA256 digest.
-     * 
- * - * EC_SIGN_P256_SHA256 = 9; - */ - public static final SignatureAlgorithm EC_SIGN_P256_SHA256 = ECDSA_P256_SHA256; - /** - * - * - *
-     * ECDSA on the NIST P-384 curve with a SHA384 digest.
-     * 
- * - * EC_SIGN_P384_SHA384 = 10; - */ - public static final SignatureAlgorithm EC_SIGN_P384_SHA384 = ECDSA_P384_SHA384; - /** - * - * - *
-     * ECDSA on the NIST P-521 curve with a SHA512 digest.
-     * 
- * - * EC_SIGN_P521_SHA512 = 11; - */ - public static final SignatureAlgorithm EC_SIGN_P521_SHA512 = ECDSA_P521_SHA512; - /** - * - * - *
-     * Not specified.
-     * 
- * - * SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - */ - public static final int SIGNATURE_ALGORITHM_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * RSASSA-PSS 2048 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_2048_SHA256 = 1; - */ - public static final int RSA_PSS_2048_SHA256_VALUE = 1; - /** - * - * - *
-     * RSASSA-PSS 3072 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_3072_SHA256 = 2; - */ - public static final int RSA_PSS_3072_SHA256_VALUE = 2; - /** - * - * - *
-     * RSASSA-PSS 4096 bit key with a SHA256 digest.
-     * 
- * - * RSA_PSS_4096_SHA256 = 3; - */ - public static final int RSA_PSS_4096_SHA256_VALUE = 3; - /** - * - * - *
-     * RSASSA-PSS 4096 bit key with a SHA512 digest.
-     * 
- * - * RSA_PSS_4096_SHA512 = 4; - */ - public static final int RSA_PSS_4096_SHA512_VALUE = 4; - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_2048_SHA256 = 5; - */ - public static final int RSA_SIGN_PKCS1_2048_SHA256_VALUE = 5; - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_3072_SHA256 = 6; - */ - public static final int RSA_SIGN_PKCS1_3072_SHA256_VALUE = 6; - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest.
-     * 
- * - * RSA_SIGN_PKCS1_4096_SHA256 = 7; - */ - public static final int RSA_SIGN_PKCS1_4096_SHA256_VALUE = 7; - /** - * - * - *
-     * RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest.
-     * 
- * - * RSA_SIGN_PKCS1_4096_SHA512 = 8; - */ - public static final int RSA_SIGN_PKCS1_4096_SHA512_VALUE = 8; - /** - * - * - *
-     * ECDSA on the NIST P-256 curve with a SHA256 digest.
-     * 
- * - * ECDSA_P256_SHA256 = 9; - */ - public static final int ECDSA_P256_SHA256_VALUE = 9; - /** - * - * - *
-     * ECDSA on the NIST P-256 curve with a SHA256 digest.
-     * 
- * - * EC_SIGN_P256_SHA256 = 9; - */ - public static final int EC_SIGN_P256_SHA256_VALUE = 9; - /** - * - * - *
-     * ECDSA on the NIST P-384 curve with a SHA384 digest.
-     * 
- * - * ECDSA_P384_SHA384 = 10; - */ - public static final int ECDSA_P384_SHA384_VALUE = 10; - /** - * - * - *
-     * ECDSA on the NIST P-384 curve with a SHA384 digest.
-     * 
- * - * EC_SIGN_P384_SHA384 = 10; - */ - public static final int EC_SIGN_P384_SHA384_VALUE = 10; - /** - * - * - *
-     * ECDSA on the NIST P-521 curve with a SHA512 digest.
-     * 
- * - * ECDSA_P521_SHA512 = 11; - */ - public static final int ECDSA_P521_SHA512_VALUE = 11; - /** - * - * - *
-     * ECDSA on the NIST P-521 curve with a SHA512 digest.
-     * 
- * - * EC_SIGN_P521_SHA512 = 11; - */ - public static final int EC_SIGN_P521_SHA512_VALUE = 11; - - public final int getNumber() { - if (index == -1) { - 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 SignatureAlgorithm 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 SignatureAlgorithm forNumber(int value) { - switch (value) { - case 0: - return SIGNATURE_ALGORITHM_UNSPECIFIED; - case 1: - return RSA_PSS_2048_SHA256; - case 2: - return RSA_PSS_3072_SHA256; - case 3: - return RSA_PSS_4096_SHA256; - case 4: - return RSA_PSS_4096_SHA512; - case 5: - return RSA_SIGN_PKCS1_2048_SHA256; - case 6: - return RSA_SIGN_PKCS1_3072_SHA256; - case 7: - return RSA_SIGN_PKCS1_4096_SHA256; - case 8: - return RSA_SIGN_PKCS1_4096_SHA512; - case 9: - return ECDSA_P256_SHA256; - case 10: - return ECDSA_P384_SHA384; - case 11: - return ECDSA_P521_SHA512; - 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 SignatureAlgorithm findValueByNumber(int number) { - return SignatureAlgorithm.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { - if (index == -1) { - throw new java.lang.IllegalStateException( - "Can't get the descriptor of an unrecognized enum value."); - } - return getDescriptor().getValues().get(index); - } - - public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { - return getDescriptor(); - } - - public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final SignatureAlgorithm[] VALUES = getStaticValuesArray(); - - private static SignatureAlgorithm[] getStaticValuesArray() { - return new SignatureAlgorithm[] { - SIGNATURE_ALGORITHM_UNSPECIFIED, - RSA_PSS_2048_SHA256, - RSA_PSS_3072_SHA256, - RSA_PSS_4096_SHA256, - RSA_PSS_4096_SHA512, - RSA_SIGN_PKCS1_2048_SHA256, - RSA_SIGN_PKCS1_3072_SHA256, - RSA_SIGN_PKCS1_4096_SHA256, - RSA_SIGN_PKCS1_4096_SHA512, - ECDSA_P256_SHA256, - EC_SIGN_P256_SHA256, - ECDSA_P384_SHA384, - EC_SIGN_P384_SHA384, - ECDSA_P521_SHA512, - EC_SIGN_P521_SHA512, - }; - } - - public static SignatureAlgorithm 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 index; - private final int value; - - private SignatureAlgorithm(int index, int value) { - this.index = index; - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm) - } - - public static final int PUBLIC_KEY_PEM_FIELD_NUMBER = 1; - private volatile java.lang.Object publicKeyPem_; - /** - * - * - *
-   * A PEM-encoded public key, as described in
-   * https://tools.ietf.org/html/rfc7468#section-13
-   * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - @java.lang.Override - public java.lang.String getPublicKeyPem() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyPem_ = s; - return s; - } - } - /** - * - * - *
-   * A PEM-encoded public key, as described in
-   * https://tools.ietf.org/html/rfc7468#section-13
-   * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPublicKeyPemBytes() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - publicKeyPem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int SIGNATURE_ALGORITHM_FIELD_NUMBER = 2; - private int signatureAlgorithm_; - /** - * - * - *
-   * The signature algorithm used to verify a message against a signature using
-   * this key.
-   * These signature algorithm must match the structure and any object
-   * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-   * that of the public key).
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - @java.lang.Override - public int getSignatureAlgorithmValue() { - return signatureAlgorithm_; - } - /** - * - * - *
-   * The signature algorithm used to verify a message against a signature using
-   * this key.
-   * These signature algorithm must match the structure and any object
-   * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-   * that of the public key).
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - getSignatureAlgorithm() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm result = - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm.valueOf( - signatureAlgorithm_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, publicKeyPem_); - } - if (signatureAlgorithm_ - != com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - .SIGNATURE_ALGORITHM_UNSPECIFIED - .getNumber()) { - output.writeEnum(2, signatureAlgorithm_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(publicKeyPem_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, publicKeyPem_); - } - if (signatureAlgorithm_ - != com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - .SIGNATURE_ALGORITHM_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, signatureAlgorithm_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey other = - (com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) obj; - - if (!getPublicKeyPem().equals(other.getPublicKeyPem())) return false; - if (signatureAlgorithm_ != other.signatureAlgorithm_) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + PUBLIC_KEY_PEM_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeyPem().hashCode(); - hash = (37 * hash) + SIGNATURE_ALGORITHM_FIELD_NUMBER; - hash = (53 * hash) + signatureAlgorithm_; - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 public key in the PkixPublicKey format (see
-   * https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details).
-   * Public keys of this type are typically textually encoded using the PEM
-   * format.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.PkixPublicKey} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.PkixPublicKey) - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKeyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.class, - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - publicKeyPem_ = ""; - - signatureAlgorithm_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_PkixPublicKey_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey build() { - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey result = - new com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey(this); - result.publicKeyPem_ = publicKeyPem_; - result.signatureAlgorithm_ = signatureAlgorithm_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey other) { - if (other == com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.getDefaultInstance()) - return this; - if (!other.getPublicKeyPem().isEmpty()) { - publicKeyPem_ = other.publicKeyPem_; - onChanged(); - } - if (other.signatureAlgorithm_ != 0) { - setSignatureAlgorithmValue(other.getSignatureAlgorithmValue()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - publicKeyPem_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 16: - { - signatureAlgorithm_ = input.readEnum(); - - break; - } // case 16 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object publicKeyPem_ = ""; - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - public java.lang.String getPublicKeyPem() { - java.lang.Object ref = publicKeyPem_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - publicKeyPem_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - public com.google.protobuf.ByteString getPublicKeyPemBytes() { - java.lang.Object ref = publicKeyPem_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - publicKeyPem_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @param value The publicKeyPem to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyPem(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - publicKeyPem_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @return This builder for chaining. - */ - public Builder clearPublicKeyPem() { - - publicKeyPem_ = getDefaultInstance().getPublicKeyPem(); - onChanged(); - return this; - } - /** - * - * - *
-     * A PEM-encoded public key, as described in
-     * https://tools.ietf.org/html/rfc7468#section-13
-     * 
- * - * string public_key_pem = 1; - * - * @param value The bytes for publicKeyPem to set. - * @return This builder for chaining. - */ - public Builder setPublicKeyPemBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - publicKeyPem_ = value; - onChanged(); - return this; - } - - private int signatureAlgorithm_ = 0; - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - @java.lang.Override - public int getSignatureAlgorithmValue() { - return signatureAlgorithm_; - } - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @param value The enum numeric value on the wire for signatureAlgorithm to set. - * @return This builder for chaining. - */ - public Builder setSignatureAlgorithmValue(int value) { - - signatureAlgorithm_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - getSignatureAlgorithm() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm result = - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm.valueOf( - signatureAlgorithm_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - .UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @param value The signatureAlgorithm to set. - * @return This builder for chaining. - */ - public Builder setSignatureAlgorithm( - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm value) { - if (value == null) { - throw new NullPointerException(); - } - - signatureAlgorithm_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The signature algorithm used to verify a message against a signature using
-     * this key.
-     * These signature algorithm must match the structure and any object
-     * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-     * that of the public key).
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return This builder for chaining. - */ - public Builder clearSignatureAlgorithm() { - - signatureAlgorithm_ = 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.binaryauthorization.v1beta1.PkixPublicKey) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.PkixPublicKey) - private static final com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PkixPublicKey parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKeyOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKeyOrBuilder.java deleted file mode 100644 index 6e0faf64..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PkixPublicKeyOrBuilder.java +++ /dev/null @@ -1,90 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface PkixPublicKeyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.PkixPublicKey) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * A PEM-encoded public key, as described in
-   * https://tools.ietf.org/html/rfc7468#section-13
-   * 
- * - * string public_key_pem = 1; - * - * @return The publicKeyPem. - */ - java.lang.String getPublicKeyPem(); - /** - * - * - *
-   * A PEM-encoded public key, as described in
-   * https://tools.ietf.org/html/rfc7468#section-13
-   * 
- * - * string public_key_pem = 1; - * - * @return The bytes for publicKeyPem. - */ - com.google.protobuf.ByteString getPublicKeyPemBytes(); - - /** - * - * - *
-   * The signature algorithm used to verify a message against a signature using
-   * this key.
-   * These signature algorithm must match the structure and any object
-   * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-   * that of the public key).
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The enum numeric value on the wire for signatureAlgorithm. - */ - int getSignatureAlgorithmValue(); - /** - * - * - *
-   * The signature algorithm used to verify a message against a signature using
-   * this key.
-   * These signature algorithm must match the structure and any object
-   * identifiers encoded in `public_key_pem` (i.e. this algorithm must match
-   * that of the public key).
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm signature_algorithm = 2; - * - * - * @return The signatureAlgorithm. - */ - com.google.cloud.binaryauthorization.v1beta1.PkixPublicKey.SignatureAlgorithm - getSignatureAlgorithm(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java deleted file mode 100644 index ec210dd1..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/Policy.java +++ /dev/null @@ -1,4021 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Policy} - */ -public final class Policy extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.Policy) - PolicyOrBuilder { - private static final long serialVersionUID = 0L; - // Use Policy.newBuilder() to construct. - private Policy(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private Policy() { - name_ = ""; - description_ = ""; - globalPolicyEvaluationMode_ = 0; - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Policy(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterAdmissionRules(); - case 10: - return internalGetKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.Policy.class, - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder.class); - } - - /** - * Protobuf enum {@code - * google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode} - */ - public enum GlobalPolicyEvaluationMode implements com.google.protobuf.ProtocolMessageEnum { - /** - * - * - *
-     * Not specified: DISABLE is assumed.
-     * 
- * - * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - */ - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED(0), - /** - * - * - *
-     * Enables system policy evaluation.
-     * 
- * - * ENABLE = 1; - */ - ENABLE(1), - /** - * - * - *
-     * Disables system policy evaluation.
-     * 
- * - * DISABLE = 2; - */ - DISABLE(2), - UNRECOGNIZED(-1), - ; - - /** - * - * - *
-     * Not specified: DISABLE is assumed.
-     * 
- * - * GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - */ - public static final int GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED_VALUE = 0; - /** - * - * - *
-     * Enables system policy evaluation.
-     * 
- * - * ENABLE = 1; - */ - public static final int ENABLE_VALUE = 1; - /** - * - * - *
-     * Disables system policy evaluation.
-     * 
- * - * DISABLE = 2; - */ - public static final int DISABLE_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 GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode forNumber(int value) { - switch (value) { - case 0: - return GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED; - case 1: - return ENABLE; - case 2: - return DISABLE; - 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 GlobalPolicyEvaluationMode findValueByNumber(int number) { - return GlobalPolicyEvaluationMode.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.binaryauthorization.v1beta1.Policy.getDescriptor() - .getEnumTypes() - .get(0); - } - - private static final GlobalPolicyEvaluationMode[] VALUES = values(); - - public static GlobalPolicyEvaluationMode 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 GlobalPolicyEvaluationMode(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode) - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * - * - *
-   * Output only. The resource name, in the format `projects/*/policy`. There is
-   * at most one policy per project.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - @java.lang.Override - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. The resource name, in the format `projects/*/policy`. There is
-   * at most one policy per project.
-   * 
- * - * 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 DESCRIPTION_FIELD_NUMBER = 6; - private volatile java.lang.Object description_; - /** - * - * - *
-   * Optional. A descriptive comment.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - @java.lang.Override - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * - * - *
-   * Optional. A descriptive comment.
-   * 
- * - * string description = 6 [(.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 GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER = 7; - private int globalPolicyEvaluationMode_; - /** - * - * - *
-   * Optional. Controls the evaluation of a Google-maintained global admission
-   * policy for common system-level images. Images not covered by the global
-   * policy will be subject to the project admission policy. This setting
-   * has no effect when specified inside a global admission policy.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - @java.lang.Override - public int getGlobalPolicyEvaluationModeValue() { - return globalPolicyEvaluationMode_; - } - /** - * - * - *
-   * Optional. Controls the evaluation of a Google-maintained global admission
-   * policy for common system-level images. Images not covered by the global
-   * policy will be subject to the project admission policy. This setting
-   * has no effect when specified inside a global admission policy.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode result = - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode.valueOf( - globalPolicyEvaluationMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .UNRECOGNIZED - : result; - } - - public static final int ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER = 2; - private java.util.List - admissionWhitelistPatterns_; - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getAdmissionWhitelistPatternsList() { - return admissionWhitelistPatterns_; - } - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList() { - return admissionWhitelistPatterns_; - } - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getAdmissionWhitelistPatternsCount() { - return admissionWhitelistPatterns_.size(); - } - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index) { - return admissionWhitelistPatterns_.get(index); - } - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index) { - return admissionWhitelistPatterns_.get(index); - } - - public static final int CLUSTER_ADMISSION_RULES_FIELD_NUMBER = 3; - - private static final class ClusterAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.binaryauthorization.v1beta1 - .BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_ClusterAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - .getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetClusterAdmissionRules() { - if (clusterAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return clusterAdmissionRules_; - } - - public int getClusterAdmissionRulesCount() { - return internalGetClusterAdmissionRules().getMap().size(); - } - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetClusterAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getClusterAdmissionRules() { - return getClusterAdmissionRulesMap(); - } - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map - getClusterAdmissionRulesMap() { - return internalGetClusterAdmissionRules().getMap(); - } - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getClusterAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetClusterAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrThrow( - java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetClusterAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER = 10; - - private static final class KubernetesNamespaceAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.binaryauthorization.v1beta1 - .BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesNamespaceAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - .getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesNamespaceAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetKubernetesNamespaceAdmissionRules() { - if (kubernetesNamespaceAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesNamespaceAdmissionRules_; - } - - public int getKubernetesNamespaceAdmissionRulesCount() { - return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getKubernetesNamespaceAdmissionRules() { - return getKubernetesNamespaceAdmissionRulesMap(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map - getKubernetesNamespaceAdmissionRulesMap() { - return internalGetKubernetesNamespaceAdmissionRules().getMap(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER = 8; - - private static final class KubernetesServiceAccountAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.binaryauthorization.v1beta1 - .BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_KubernetesServiceAccountAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - .getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesServiceAccountAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetKubernetesServiceAccountAdmissionRules() { - if (kubernetesServiceAccountAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesServiceAccountAdmissionRules_; - } - - public int getKubernetesServiceAccountAdmissionRulesCount() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getKubernetesServiceAccountAdmissionRules() { - return getKubernetesServiceAccountAdmissionRulesMap(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map - getKubernetesServiceAccountAdmissionRulesMap() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap(); - } - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER = 9; - - private static final class IstioServiceIdentityAdmissionRulesDefaultEntryHolder { - static final com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - defaultEntry = - com.google.protobuf.MapEntry - . - newDefaultInstance( - com.google.cloud.binaryauthorization.v1beta1 - .BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_IstioServiceIdentityAdmissionRulesEntry_descriptor, - com.google.protobuf.WireFormat.FieldType.STRING, - "", - com.google.protobuf.WireFormat.FieldType.MESSAGE, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - .getDefaultInstance()); - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - istioServiceIdentityAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetIstioServiceIdentityAdmissionRules() { - if (istioServiceIdentityAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return istioServiceIdentityAdmissionRules_; - } - - public int getIstioServiceIdentityAdmissionRulesCount() { - return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); - } - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map - getIstioServiceIdentityAdmissionRules() { - return getIstioServiceIdentityAdmissionRulesMap(); - } - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map - getIstioServiceIdentityAdmissionRulesMap() { - return internalGetIstioServiceIdentityAdmissionRules().getMap(); - } - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public static final int DEFAULT_ADMISSION_RULE_FIELD_NUMBER = 4; - private com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultAdmissionRule_; - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - @java.lang.Override - public boolean hasDefaultAdmissionRule() { - return defaultAdmissionRule_ != null; - } - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultAdmissionRule() { - return defaultAdmissionRule_ == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance() - : defaultAdmissionRule_; - } - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder() { - return getDefaultAdmissionRule(); - } - - public static final int UPDATE_TIME_FIELD_NUMBER = 5; - private com.google.protobuf.Timestamp updateTime_; - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - @java.lang.Override - public boolean hasUpdateTime() { - return updateTime_ != null; - } - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - @java.lang.Override - public com.google.protobuf.Timestamp getUpdateTime() { - return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; - } - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { - output.writeMessage(2, admissionWhitelistPatterns_.get(i)); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetClusterAdmissionRules(), - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry, - 3); - if (defaultAdmissionRule_ != null) { - output.writeMessage(4, getDefaultAdmissionRule()); - } - if (updateTime_ != null) { - output.writeMessage(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_); - } - if (globalPolicyEvaluationMode_ - != com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - output.writeEnum(7, globalPolicyEvaluationMode_); - } - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetKubernetesServiceAccountAdmissionRules(), - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry, - 8); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetIstioServiceIdentityAdmissionRules(), - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry, - 9); - com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( - output, - internalGetKubernetesNamespaceAdmissionRules(), - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry, - 10); - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - for (int i = 0; i < admissionWhitelistPatterns_.size(); i++) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 2, admissionWhitelistPatterns_.get(i)); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - entry : internalGetClusterAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules__ = - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, clusterAdmissionRules__); - } - if (defaultAdmissionRule_ != null) { - size += - com.google.protobuf.CodedOutputStream.computeMessageSize(4, getDefaultAdmissionRule()); - } - if (updateTime_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getUpdateTime()); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_); - } - if (globalPolicyEvaluationMode_ - != com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED - .getNumber()) { - size += com.google.protobuf.CodedOutputStream.computeEnumSize(7, globalPolicyEvaluationMode_); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - entry : internalGetKubernetesServiceAccountAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 8, kubernetesServiceAccountAdmissionRules__); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - entry : internalGetIstioServiceIdentityAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - istioServiceIdentityAdmissionRules__ = - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 9, istioServiceIdentityAdmissionRules__); - } - for (java.util.Map.Entry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - entry : internalGetKubernetesNamespaceAdmissionRules().getMap().entrySet()) { - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .newBuilderForType() - .setKey(entry.getKey()) - .setValue(entry.getValue()) - .build(); - size += - com.google.protobuf.CodedOutputStream.computeMessageSize( - 10, kubernetesNamespaceAdmissionRules__); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.Policy)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.Policy other = - (com.google.cloud.binaryauthorization.v1beta1.Policy) obj; - - if (!getName().equals(other.getName())) return false; - if (!getDescription().equals(other.getDescription())) return false; - if (globalPolicyEvaluationMode_ != other.globalPolicyEvaluationMode_) return false; - if (!getAdmissionWhitelistPatternsList().equals(other.getAdmissionWhitelistPatternsList())) - return false; - if (!internalGetClusterAdmissionRules().equals(other.internalGetClusterAdmissionRules())) - return false; - if (!internalGetKubernetesNamespaceAdmissionRules() - .equals(other.internalGetKubernetesNamespaceAdmissionRules())) return false; - if (!internalGetKubernetesServiceAccountAdmissionRules() - .equals(other.internalGetKubernetesServiceAccountAdmissionRules())) return false; - if (!internalGetIstioServiceIdentityAdmissionRules() - .equals(other.internalGetIstioServiceIdentityAdmissionRules())) return false; - if (hasDefaultAdmissionRule() != other.hasDefaultAdmissionRule()) return false; - if (hasDefaultAdmissionRule()) { - if (!getDefaultAdmissionRule().equals(other.getDefaultAdmissionRule())) return false; - } - if (hasUpdateTime() != other.hasUpdateTime()) return false; - if (hasUpdateTime()) { - if (!getUpdateTime().equals(other.getUpdateTime())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) 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(); - hash = (37 * hash) + GLOBAL_POLICY_EVALUATION_MODE_FIELD_NUMBER; - hash = (53 * hash) + globalPolicyEvaluationMode_; - if (getAdmissionWhitelistPatternsCount() > 0) { - hash = (37 * hash) + ADMISSION_WHITELIST_PATTERNS_FIELD_NUMBER; - hash = (53 * hash) + getAdmissionWhitelistPatternsList().hashCode(); - } - if (!internalGetClusterAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + CLUSTER_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetClusterAdmissionRules().hashCode(); - } - if (!internalGetKubernetesNamespaceAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + KUBERNETES_NAMESPACE_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetKubernetesNamespaceAdmissionRules().hashCode(); - } - if (!internalGetKubernetesServiceAccountAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + KUBERNETES_SERVICE_ACCOUNT_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetKubernetesServiceAccountAdmissionRules().hashCode(); - } - if (!internalGetIstioServiceIdentityAdmissionRules().getMap().isEmpty()) { - hash = (37 * hash) + ISTIO_SERVICE_IDENTITY_ADMISSION_RULES_FIELD_NUMBER; - hash = (53 * hash) + internalGetIstioServiceIdentityAdmissionRules().hashCode(); - } - if (hasDefaultAdmissionRule()) { - hash = (37 * hash) + DEFAULT_ADMISSION_RULE_FIELD_NUMBER; - hash = (53 * hash) + getDefaultAdmissionRule().hashCode(); - } - if (hasUpdateTime()) { - hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; - hash = (53 * hash) + getUpdateTime().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder(com.google.cloud.binaryauthorization.v1beta1.Policy prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.Policy} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.Policy) - com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor; - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField(int number) { - switch (number) { - case 3: - return internalGetClusterAdmissionRules(); - case 10: - return internalGetKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField(int number) { - switch (number) { - case 3: - return internalGetMutableClusterAdmissionRules(); - case 10: - return internalGetMutableKubernetesNamespaceAdmissionRules(); - case 8: - return internalGetMutableKubernetesServiceAccountAdmissionRules(); - case 9: - return internalGetMutableIstioServiceIdentityAdmissionRules(); - default: - throw new RuntimeException("Invalid map field number: " + number); - } - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.Policy.class, - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.Policy.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - globalPolicyEvaluationMode_ = 0; - - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - } else { - admissionWhitelistPatterns_ = null; - admissionWhitelistPatternsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - internalGetMutableClusterAdmissionRules().clear(); - internalGetMutableKubernetesNamespaceAdmissionRules().clear(); - internalGetMutableKubernetesServiceAccountAdmissionRules().clear(); - internalGetMutableIstioServiceIdentityAdmissionRules().clear(); - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = null; - } else { - defaultAdmissionRule_ = null; - defaultAdmissionRuleBuilder_ = 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.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_Policy_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.Policy.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy build() { - com.google.cloud.binaryauthorization.v1beta1.Policy result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.Policy result = - new com.google.cloud.binaryauthorization.v1beta1.Policy(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.description_ = description_; - result.globalPolicyEvaluationMode_ = globalPolicyEvaluationMode_; - if (admissionWhitelistPatternsBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.admissionWhitelistPatterns_ = admissionWhitelistPatterns_; - } else { - result.admissionWhitelistPatterns_ = admissionWhitelistPatternsBuilder_.build(); - } - result.clusterAdmissionRules_ = internalGetClusterAdmissionRules(); - result.clusterAdmissionRules_.makeImmutable(); - result.kubernetesNamespaceAdmissionRules_ = internalGetKubernetesNamespaceAdmissionRules(); - result.kubernetesNamespaceAdmissionRules_.makeImmutable(); - result.kubernetesServiceAccountAdmissionRules_ = - internalGetKubernetesServiceAccountAdmissionRules(); - result.kubernetesServiceAccountAdmissionRules_.makeImmutable(); - result.istioServiceIdentityAdmissionRules_ = internalGetIstioServiceIdentityAdmissionRules(); - result.istioServiceIdentityAdmissionRules_.makeImmutable(); - if (defaultAdmissionRuleBuilder_ == null) { - result.defaultAdmissionRule_ = defaultAdmissionRule_; - } else { - result.defaultAdmissionRule_ = defaultAdmissionRuleBuilder_.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.binaryauthorization.v1beta1.Policy) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.Policy) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.binaryauthorization.v1beta1.Policy other) { - if (other == com.google.cloud.binaryauthorization.v1beta1.Policy.getDefaultInstance()) - return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.globalPolicyEvaluationMode_ != 0) { - setGlobalPolicyEvaluationModeValue(other.getGlobalPolicyEvaluationModeValue()); - } - if (admissionWhitelistPatternsBuilder_ == null) { - if (!other.admissionWhitelistPatterns_.isEmpty()) { - if (admissionWhitelistPatterns_.isEmpty()) { - admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.addAll(other.admissionWhitelistPatterns_); - } - onChanged(); - } - } else { - if (!other.admissionWhitelistPatterns_.isEmpty()) { - if (admissionWhitelistPatternsBuilder_.isEmpty()) { - admissionWhitelistPatternsBuilder_.dispose(); - admissionWhitelistPatternsBuilder_ = null; - admissionWhitelistPatterns_ = other.admissionWhitelistPatterns_; - bitField0_ = (bitField0_ & ~0x00000001); - admissionWhitelistPatternsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getAdmissionWhitelistPatternsFieldBuilder() - : null; - } else { - admissionWhitelistPatternsBuilder_.addAllMessages(other.admissionWhitelistPatterns_); - } - } - } - internalGetMutableClusterAdmissionRules().mergeFrom(other.internalGetClusterAdmissionRules()); - internalGetMutableKubernetesNamespaceAdmissionRules() - .mergeFrom(other.internalGetKubernetesNamespaceAdmissionRules()); - internalGetMutableKubernetesServiceAccountAdmissionRules() - .mergeFrom(other.internalGetKubernetesServiceAccountAdmissionRules()); - internalGetMutableIstioServiceIdentityAdmissionRules() - .mergeFrom(other.internalGetIstioServiceIdentityAdmissionRules()); - if (other.hasDefaultAdmissionRule()) { - mergeDefaultAdmissionRule(other.getDefaultAdmissionRule()); - } - if (other.hasUpdateTime()) { - mergeUpdateTime(other.getUpdateTime()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - name_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern m = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .parser(), - extensionRegistry); - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(m); - } else { - admissionWhitelistPatternsBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules__ = - input.readMessage( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - internalGetMutableClusterAdmissionRules() - .getMutableMap() - .put(clusterAdmissionRules__.getKey(), clusterAdmissionRules__.getValue()); - break; - } // case 26 - case 34: - { - input.readMessage( - getDefaultAdmissionRuleFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 34 - case 42: - { - input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 42 - case 50: - { - description_ = input.readStringRequireUtf8(); - - break; - } // case 50 - case 56: - { - globalPolicyEvaluationMode_ = input.readEnum(); - - break; - } // case 56 - case 66: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesServiceAccountAdmissionRules__ = - input.readMessage( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableKubernetesServiceAccountAdmissionRules() - .getMutableMap() - .put( - kubernetesServiceAccountAdmissionRules__.getKey(), - kubernetesServiceAccountAdmissionRules__.getValue()); - break; - } // case 66 - case 74: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - istioServiceIdentityAdmissionRules__ = - input.readMessage( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableIstioServiceIdentityAdmissionRules() - .getMutableMap() - .put( - istioServiceIdentityAdmissionRules__.getKey(), - istioServiceIdentityAdmissionRules__.getValue()); - break; - } // case 74 - case 82: - { - com.google.protobuf.MapEntry< - java.lang.String, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesNamespaceAdmissionRules__ = - input.readMessage( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry - .getParserForType(), - extensionRegistry); - internalGetMutableKubernetesNamespaceAdmissionRules() - .getMutableMap() - .put( - kubernetesNamespaceAdmissionRules__.getKey(), - kubernetesNamespaceAdmissionRules__.getValue()); - break; - } // case 82 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - public com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @param value The name to set. - * @return This builder for chaining. - */ - public Builder setName(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return This builder for chaining. - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The resource name, in the format `projects/*/policy`. There is
-     * at most one policy per project.
-     * 
- * - * 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 description_ = ""; - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - public com.google.protobuf.ByteString getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @param value The description to set. - * @return This builder for chaining. - */ - public Builder setDescription(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return This builder for chaining. - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. A descriptive comment.
-     * 
- * - * string description = 6 [(.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 int globalPolicyEvaluationMode_ = 0; - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - @java.lang.Override - public int getGlobalPolicyEvaluationModeValue() { - return globalPolicyEvaluationMode_; - } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The enum numeric value on the wire for globalPolicyEvaluationMode to set. - * @return This builder for chaining. - */ - public Builder setGlobalPolicyEvaluationModeValue(int value) { - - globalPolicyEvaluationMode_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode() { - @SuppressWarnings("deprecation") - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode result = - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode.valueOf( - globalPolicyEvaluationMode_); - return result == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - .UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @param value The globalPolicyEvaluationMode to set. - * @return This builder for chaining. - */ - public Builder setGlobalPolicyEvaluationMode( - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode value) { - if (value == null) { - throw new NullPointerException(); - } - - globalPolicyEvaluationMode_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Optional. Controls the evaluation of a Google-maintained global admission
-     * policy for common system-level images. Images not covered by the global
-     * policy will be subject to the project admission policy. This setting
-     * has no effect when specified inside a global admission policy.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return This builder for chaining. - */ - public Builder clearGlobalPolicyEvaluationMode() { - - globalPolicyEvaluationMode_ = 0; - onChanged(); - return this; - } - - private java.util.List - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - - private void ensureAdmissionWhitelistPatternsIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - admissionWhitelistPatterns_ = - new java.util.ArrayList< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern>( - admissionWhitelistPatterns_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - admissionWhitelistPatternsBuilder_; - - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getAdmissionWhitelistPatternsList() { - if (admissionWhitelistPatternsBuilder_ == null) { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } else { - return admissionWhitelistPatternsBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getAdmissionWhitelistPatternsCount() { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.size(); - } else { - return admissionWhitelistPatternsBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdmissionWhitelistPatterns( - int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setAdmissionWhitelistPatterns( - int index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.set(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - int index, com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern value) { - if (admissionWhitelistPatternsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, value); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAdmissionWhitelistPatterns( - int index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - builderForValue) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.add(index, builderForValue.build()); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllAdmissionWhitelistPatterns( - java.lang.Iterable< - ? extends com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern> - values) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, admissionWhitelistPatterns_); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearAdmissionWhitelistPatterns() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatterns_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeAdmissionWhitelistPatterns(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - ensureAdmissionWhitelistPatternsIsMutable(); - admissionWhitelistPatterns_.remove(index); - onChanged(); - } else { - admissionWhitelistPatternsBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - getAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index) { - if (admissionWhitelistPatternsBuilder_ == null) { - return admissionWhitelistPatterns_.get(index); - } else { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList() { - if (admissionWhitelistPatternsBuilder_ != null) { - return admissionWhitelistPatternsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(admissionWhitelistPatterns_); - } - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder() { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder - addAdmissionWhitelistPatternsBuilder(int index) { - return getAdmissionWhitelistPatternsFieldBuilder() - .addBuilder( - index, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - .getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Admission policy allowlisting. A matching admission request will
-     * always be permitted. This feature is typically used to exclude Google or
-     * third-party infrastructure images from Binary Authorization policies.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder> - getAdmissionWhitelistPatternsBuilderList() { - return getAdmissionWhitelistPatternsFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsFieldBuilder() { - if (admissionWhitelistPatternsBuilder_ == null) { - admissionWhitelistPatternsBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder>( - admissionWhitelistPatterns_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - admissionWhitelistPatterns_ = null; - } - return admissionWhitelistPatternsBuilder_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - clusterAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetClusterAdmissionRules() { - if (clusterAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return clusterAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetMutableClusterAdmissionRules() { - onChanged(); - ; - if (clusterAdmissionRules_ == null) { - clusterAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - ClusterAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!clusterAdmissionRules_.isMutable()) { - clusterAdmissionRules_ = clusterAdmissionRules_.copy(); - } - return clusterAdmissionRules_; - } - - public int getClusterAdmissionRulesCount() { - return internalGetClusterAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetClusterAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getClusterAdmissionRules() { - return getClusterAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getClusterAdmissionRulesMap() { - return internalGetClusterAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getClusterAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetClusterAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getClusterAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetClusterAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearClusterAdmissionRules() { - internalGetMutableClusterAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeClusterAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableClusterAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getMutableClusterAdmissionRules() { - return internalGetMutableClusterAdmissionRules().getMutableMap(); - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putClusterAdmissionRules( - java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableClusterAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Per-cluster admission rules. Cluster spec format:
-     * `location.clusterId`. There can be at most one admission rule per cluster
-     * spec.
-     * A `location` is either a compute zone (e.g. us-central1-a) or a region
-     * (e.g. us-central1).
-     * For `clusterId` syntax restrictions see
-     * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllClusterAdmissionRules( - java.util.Map - values) { - internalGetMutableClusterAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesNamespaceAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetKubernetesNamespaceAdmissionRules() { - if (kubernetesNamespaceAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesNamespaceAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetMutableKubernetesNamespaceAdmissionRules() { - onChanged(); - ; - if (kubernetesNamespaceAdmissionRules_ == null) { - kubernetesNamespaceAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesNamespaceAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!kubernetesNamespaceAdmissionRules_.isMutable()) { - kubernetesNamespaceAdmissionRules_ = kubernetesNamespaceAdmissionRules_.copy(); - } - return kubernetesNamespaceAdmissionRules_; - } - - public int getKubernetesNamespaceAdmissionRulesCount() { - return internalGetKubernetesNamespaceAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesNamespaceAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getKubernetesNamespaceAdmissionRules() { - return getKubernetesNamespaceAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getKubernetesNamespaceAdmissionRulesMap() { - return internalGetKubernetesNamespaceAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesNamespaceAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearKubernetesNamespaceAdmissionRules() { - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeKubernetesNamespaceAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getMutableKubernetesNamespaceAdmissionRules() { - return internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putKubernetesNamespaceAdmissionRules( - java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-     *   `[a-z.-]+`, e.g. `some-namespace`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllKubernetesNamespaceAdmissionRules( - java.util.Map - values) { - internalGetMutableKubernetesNamespaceAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - kubernetesServiceAccountAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetKubernetesServiceAccountAdmissionRules() { - if (kubernetesServiceAccountAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return kubernetesServiceAccountAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetMutableKubernetesServiceAccountAdmissionRules() { - onChanged(); - ; - if (kubernetesServiceAccountAdmissionRules_ == null) { - kubernetesServiceAccountAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - KubernetesServiceAccountAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!kubernetesServiceAccountAdmissionRules_.isMutable()) { - kubernetesServiceAccountAdmissionRules_ = kubernetesServiceAccountAdmissionRules_.copy(); - } - return kubernetesServiceAccountAdmissionRules_; - } - - public int getKubernetesServiceAccountAdmissionRulesCount() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetKubernetesServiceAccountAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getKubernetesServiceAccountAdmissionRules() { - return getKubernetesServiceAccountAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getKubernetesServiceAccountAdmissionRulesMap() { - return internalGetKubernetesServiceAccountAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetKubernetesServiceAccountAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearKubernetesServiceAccountAdmissionRules() { - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeKubernetesServiceAccountAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getMutableKubernetesServiceAccountAdmissionRules() { - return internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap(); - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putKubernetesServiceAccountAdmissionRules( - java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Per-kubernetes-service-account admission rules. Service account
-     * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllKubernetesServiceAccountAdmissionRules( - java.util.Map - values) { - internalGetMutableKubernetesServiceAccountAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - istioServiceIdentityAdmissionRules_; - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetIstioServiceIdentityAdmissionRules() { - if (istioServiceIdentityAdmissionRules_ == null) { - return com.google.protobuf.MapField.emptyMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - return istioServiceIdentityAdmissionRules_; - } - - private com.google.protobuf.MapField< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - internalGetMutableIstioServiceIdentityAdmissionRules() { - onChanged(); - ; - if (istioServiceIdentityAdmissionRules_ == null) { - istioServiceIdentityAdmissionRules_ = - com.google.protobuf.MapField.newMapField( - IstioServiceIdentityAdmissionRulesDefaultEntryHolder.defaultEntry); - } - if (!istioServiceIdentityAdmissionRules_.isMutable()) { - istioServiceIdentityAdmissionRules_ = istioServiceIdentityAdmissionRules_.copy(); - } - return istioServiceIdentityAdmissionRules_; - } - - public int getIstioServiceIdentityAdmissionRulesCount() { - return internalGetIstioServiceIdentityAdmissionRules().getMap().size(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - return internalGetIstioServiceIdentityAdmissionRules().getMap().containsKey(key); - } - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Override - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getIstioServiceIdentityAdmissionRules() { - return getIstioServiceIdentityAdmissionRulesMap(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getIstioServiceIdentityAdmissionRulesMap() { - return internalGetIstioServiceIdentityAdmissionRules().getMap(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - return map.containsKey(key) ? map.get(key) : defaultValue; - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - java.util.Map - map = internalGetIstioServiceIdentityAdmissionRules().getMap(); - if (!map.containsKey(key)) { - throw new java.lang.IllegalArgumentException(); - } - return map.get(key); - } - - public Builder clearIstioServiceIdentityAdmissionRules() { - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().clear(); - return this; - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removeIstioServiceIdentityAdmissionRules(java.lang.String key) { - if (key == null) { - throw new NullPointerException("map key"); - } - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().remove(key); - return this; - } - /** Use alternate mutation accessors instead. */ - @java.lang.Deprecated - public java.util.Map< - java.lang.String, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule> - getMutableIstioServiceIdentityAdmissionRules() { - return internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap(); - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putIstioServiceIdentityAdmissionRules( - java.lang.String key, com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (key == null) { - throw new NullPointerException("map key"); - } - if (value == null) { - throw new NullPointerException("map value"); - } - - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().put(key, value); - return this; - } - /** - * - * - *
-     * Optional. Per-istio-service-identity admission rules. Istio service
-     * identity spec format:
-     * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-     * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-     * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-     * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder putAllIstioServiceIdentityAdmissionRules( - java.util.Map - values) { - internalGetMutableIstioServiceIdentityAdmissionRules().getMutableMap().putAll(values); - return this; - } - - private com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultAdmissionRule_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder> - defaultAdmissionRuleBuilder_; - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - public boolean hasDefaultAdmissionRule() { - return defaultAdmissionRuleBuilder_ != null || defaultAdmissionRule_ != null; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultAdmissionRule() { - if (defaultAdmissionRuleBuilder_ == null) { - return defaultAdmissionRule_ == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance() - : defaultAdmissionRule_; - } else { - return defaultAdmissionRuleBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDefaultAdmissionRule( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (defaultAdmissionRuleBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - defaultAdmissionRule_ = value; - onChanged(); - } else { - defaultAdmissionRuleBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setDefaultAdmissionRule( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder builderForValue) { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = builderForValue.build(); - onChanged(); - } else { - defaultAdmissionRuleBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeDefaultAdmissionRule( - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule value) { - if (defaultAdmissionRuleBuilder_ == null) { - if (defaultAdmissionRule_ != null) { - defaultAdmissionRule_ = - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.newBuilder( - defaultAdmissionRule_) - .mergeFrom(value) - .buildPartial(); - } else { - defaultAdmissionRule_ = value; - } - onChanged(); - } else { - defaultAdmissionRuleBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearDefaultAdmissionRule() { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRule_ = null; - onChanged(); - } else { - defaultAdmissionRule_ = null; - defaultAdmissionRuleBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder - getDefaultAdmissionRuleBuilder() { - - onChanged(); - return getDefaultAdmissionRuleFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder() { - if (defaultAdmissionRuleBuilder_ != null) { - return defaultAdmissionRuleBuilder_.getMessageOrBuilder(); - } else { - return defaultAdmissionRule_ == null - ? com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.getDefaultInstance() - : defaultAdmissionRule_; - } - } - /** - * - * - *
-     * Required. Default admission rule for a cluster without a per-cluster, per-
-     * kubernetes-service-account, or per-istio-service-identity admission rule.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder> - getDefaultAdmissionRuleFieldBuilder() { - if (defaultAdmissionRuleBuilder_ == null) { - defaultAdmissionRuleBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule.Builder, - com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder>( - getDefaultAdmissionRule(), getParentForChildren(), isClean()); - defaultAdmissionRule_ = null; - } - return defaultAdmissionRuleBuilder_; - } - - 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 when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - public boolean hasUpdateTime() { - return updateTimeBuilder_ != null || updateTime_ != null; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - public com.google.protobuf.Timestamp getUpdateTime() { - if (updateTimeBuilder_ == null) { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } else { - return updateTimeBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - updateTime_ = value; - onChanged(); - } else { - updateTimeBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { - if (updateTimeBuilder_ == null) { - updateTime_ = builderForValue.build(); - onChanged(); - } else { - updateTimeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { - if (updateTimeBuilder_ == null) { - if (updateTime_ != null) { - updateTime_ = - com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); - } else { - updateTime_ = value; - } - onChanged(); - } else { - updateTimeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public Builder clearUpdateTime() { - if (updateTimeBuilder_ == null) { - updateTime_ = null; - onChanged(); - } else { - updateTime_ = null; - updateTimeBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { - - onChanged(); - return getUpdateTimeFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { - if (updateTimeBuilder_ != null) { - return updateTimeBuilder_.getMessageOrBuilder(); - } else { - return updateTime_ == null - ? com.google.protobuf.Timestamp.getDefaultInstance() - : updateTime_; - } - } - /** - * - * - *
-     * Output only. Time when the policy was last updated.
-     * 
- * - * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder> - getUpdateTimeFieldBuilder() { - if (updateTimeBuilder_ == null) { - updateTimeBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.protobuf.Timestamp, - com.google.protobuf.Timestamp.Builder, - com.google.protobuf.TimestampOrBuilder>( - getUpdateTime(), getParentForChildren(), isClean()); - updateTime_ = null; - } - return updateTimeBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.Policy) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.Policy) - private static final com.google.cloud.binaryauthorization.v1beta1.Policy DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.Policy(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.Policy getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public Policy parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java deleted file mode 100644 index c7bcff8d..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyName.java +++ /dev/null @@ -1,254 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.core.BetaApi; -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.pathtemplate.ValidationException; -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 PolicyName implements ResourceName { - private static final PathTemplate PROJECT = - PathTemplate.createWithoutUrlEncoding("projects/{project}/policy"); - private static final PathTemplate LOCATION = - PathTemplate.createWithoutUrlEncoding("locations/{location}/policy"); - private volatile Map fieldValuesMap; - private PathTemplate pathTemplate; - private String fixedValue; - private final String project; - private final String location; - - @Deprecated - protected PolicyName() { - project = null; - location = null; - } - - private PolicyName(Builder builder) { - project = Preconditions.checkNotNull(builder.getProject()); - location = null; - pathTemplate = PROJECT; - } - - private PolicyName(LocationBuilder builder) { - location = Preconditions.checkNotNull(builder.getLocation()); - project = null; - pathTemplate = LOCATION; - } - - public String getProject() { - return project; - } - - public String getLocation() { - return location; - } - - public static Builder newBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static Builder newProjectBuilder() { - return new Builder(); - } - - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static LocationBuilder newLocationBuilder() { - return new LocationBuilder(); - } - - public Builder toBuilder() { - return new Builder(this); - } - - public static PolicyName of(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static PolicyName ofProjectName(String project) { - return newBuilder().setProject(project).build(); - } - - @BetaApi("The static create methods are not stable yet and may be changed in the future.") - public static PolicyName ofLocationName(String location) { - return newLocationBuilder().setLocation(location).build(); - } - - public static String format(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatProjectName(String project) { - return newBuilder().setProject(project).build().toString(); - } - - @BetaApi("The static format methods are not stable yet and may be changed in the future.") - public static String formatLocationName(String location) { - return newLocationBuilder().setLocation(location).build().toString(); - } - - public static PolicyName parse(String formattedString) { - if (formattedString.isEmpty()) { - return null; - } - if (PROJECT.matches(formattedString)) { - Map matchMap = PROJECT.match(formattedString); - return ofProjectName(matchMap.get("project")); - } else if (LOCATION.matches(formattedString)) { - Map matchMap = LOCATION.match(formattedString); - return ofLocationName(matchMap.get("location")); - } - throw new ValidationException("PolicyName.parse: formattedString not in valid format"); - } - - 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 (PolicyName value : values) { - if (value == null) { - list.add(""); - } else { - list.add(value.toString()); - } - } - return list; - } - - public static boolean isParsableFrom(String formattedString) { - return PROJECT.matches(formattedString) || 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 fixedValue != null ? fixedValue : pathTemplate.instantiate(getFieldValuesMap()); - } - - @Override - public boolean equals(Object o) { - if (o == this) { - return true; - } - if (o != null || getClass() == o.getClass()) { - PolicyName that = ((PolicyName) 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(fixedValue); - h *= 1000003; - h ^= Objects.hashCode(project); - h *= 1000003; - h ^= Objects.hashCode(location); - return h; - } - - /** Builder for projects/{project}/policy. */ - 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(PolicyName policyName) { - Preconditions.checkArgument( - Objects.equals(policyName.pathTemplate, PROJECT), - "toBuilder is only supported when PolicyName has the pattern of projects/{project}/policy"); - this.project = policyName.project; - } - - public PolicyName build() { - return new PolicyName(this); - } - } - - /** Builder for locations/{location}/policy. */ - @BetaApi("The per-pattern Builders are not stable yet and may be changed in the future.") - public static class LocationBuilder { - private String location; - - protected LocationBuilder() {} - - public String getLocation() { - return location; - } - - public LocationBuilder setLocation(String location) { - this.location = location; - return this; - } - - public PolicyName build() { - return new PolicyName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java deleted file mode 100644 index 80dd78c2..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/PolicyOrBuilder.java +++ /dev/null @@ -1,623 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface PolicyOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.Policy) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Output only. The resource name, in the format `projects/*/policy`. There is
-   * at most one policy per project.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The name. - */ - java.lang.String getName(); - /** - * - * - *
-   * Output only. The resource name, in the format `projects/*/policy`. There is
-   * at most one policy per project.
-   * 
- * - * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * @return The bytes for name. - */ - com.google.protobuf.ByteString getNameBytes(); - - /** - * - * - *
-   * Optional. A descriptive comment.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The description. - */ - java.lang.String getDescription(); - /** - * - * - *
-   * Optional. A descriptive comment.
-   * 
- * - * string description = 6 [(.google.api.field_behavior) = OPTIONAL]; - * - * @return The bytes for description. - */ - com.google.protobuf.ByteString getDescriptionBytes(); - - /** - * - * - *
-   * Optional. Controls the evaluation of a Google-maintained global admission
-   * policy for common system-level images. Images not covered by the global
-   * policy will be subject to the project admission policy. This setting
-   * has no effect when specified inside a global admission policy.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The enum numeric value on the wire for globalPolicyEvaluationMode. - */ - int getGlobalPolicyEvaluationModeValue(); - /** - * - * - *
-   * Optional. Controls the evaluation of a Google-maintained global admission
-   * policy for common system-level images. Images not covered by the global
-   * policy will be subject to the project admission policy. This setting
-   * has no effect when specified inside a global admission policy.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(.google.api.field_behavior) = OPTIONAL]; - * - * - * @return The globalPolicyEvaluationMode. - */ - com.google.cloud.binaryauthorization.v1beta1.Policy.GlobalPolicyEvaluationMode - getGlobalPolicyEvaluationMode(); - - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getAdmissionWhitelistPatternsList(); - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern - getAdmissionWhitelistPatterns(int index); - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getAdmissionWhitelistPatternsCount(); - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List< - ? extends com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder> - getAdmissionWhitelistPatternsOrBuilderList(); - /** - * - * - *
-   * Optional. Admission policy allowlisting. A matching admission request will
-   * always be permitted. This feature is typically used to exclude Google or
-   * third-party infrastructure images from Binary Authorization policies.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPatternOrBuilder - getAdmissionWhitelistPatternsOrBuilder(int index); - - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getClusterAdmissionRulesCount(); - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsClusterAdmissionRules(java.lang.String key); - /** Use {@link #getClusterAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getClusterAdmissionRules(); - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map - getClusterAdmissionRulesMap(); - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); - /** - * - * - *
-   * Optional. Per-cluster admission rules. Cluster spec format:
-   * `location.clusterId`. There can be at most one admission rule per cluster
-   * spec.
-   * A `location` is either a compute zone (e.g. us-central1-a) or a region
-   * (e.g. us-central1).
-   * For `clusterId` syntax restrictions see
-   * https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters.
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> cluster_admission_rules = 3 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getClusterAdmissionRulesOrThrow( - java.lang.String key); - - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getKubernetesNamespaceAdmissionRulesCount(); - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsKubernetesNamespaceAdmissionRules(java.lang.String key); - /** Use {@link #getKubernetesNamespaceAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getKubernetesNamespaceAdmissionRules(); - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map - getKubernetesNamespaceAdmissionRulesMap(); - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); - /** - * - * - *
-   * Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format:
-   *   `[a-z.-]+`, e.g. `some-namespace`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_namespace_admission_rules = 10 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesNamespaceAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getKubernetesServiceAccountAdmissionRulesCount(); - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsKubernetesServiceAccountAdmissionRules(java.lang.String key); - /** Use {@link #getKubernetesServiceAccountAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getKubernetesServiceAccountAdmissionRules(); - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map - getKubernetesServiceAccountAdmissionRulesMap(); - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); - /** - * - * - *
-   * Optional. Per-kubernetes-service-account admission rules. Service account
-   * spec format: `namespace:serviceaccount`. e.g. `test-ns:default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> kubernetes_service_account_admission_rules = 8 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getKubernetesServiceAccountAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getIstioServiceIdentityAdmissionRulesCount(); - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - boolean containsIstioServiceIdentityAdmissionRules(java.lang.String key); - /** Use {@link #getIstioServiceIdentityAdmissionRulesMap()} instead. */ - @java.lang.Deprecated - java.util.Map - getIstioServiceIdentityAdmissionRules(); - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.Map - getIstioServiceIdentityAdmissionRulesMap(); - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrDefault( - java.lang.String key, - /* nullable */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule defaultValue); - /** - * - * - *
-   * Optional. Per-istio-service-identity admission rules. Istio service
-   * identity spec format:
-   * `spiffe://<domain>/ns/<namespace>/sa/<serviceaccount>` or
-   * `<domain>/ns/<namespace>/sa/<serviceaccount>`
-   * e.g. `spiffe://example.com/ns/test-ns/sa/default`
-   * 
- * - * - * map<string, .google.cloud.binaryauthorization.v1beta1.AdmissionRule> istio_service_identity_admission_rules = 9 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule - getIstioServiceIdentityAdmissionRulesOrThrow(java.lang.String key); - - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the defaultAdmissionRule field is set. - */ - boolean hasDefaultAdmissionRule(); - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The defaultAdmissionRule. - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRule getDefaultAdmissionRule(); - /** - * - * - *
-   * Required. Default admission rule for a cluster without a per-cluster, per-
-   * kubernetes-service-account, or per-istio-service-identity admission rule.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.AdmissionRule default_admission_rule = 4 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AdmissionRuleOrBuilder - getDefaultAdmissionRuleOrBuilder(); - - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return Whether the updateTime field is set. - */ - boolean hasUpdateTime(); - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The updateTime. - */ - com.google.protobuf.Timestamp getUpdateTime(); - /** - * - * - *
-   * Output only. Time when the policy was last updated.
-   * 
- * - * .google.protobuf.Timestamp update_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java deleted file mode 100644 index 21950d05..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/ProjectName.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1; - -import com.google.api.pathtemplate.PathTemplate; -import com.google.api.resourcenames.ResourceName; -import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableMap; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -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) { - this.project = projectName.project; - } - - public ProjectName build() { - return new ProjectName(this); - } - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java deleted file mode 100644 index f11fb2cd..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequest.java +++ /dev/null @@ -1,763 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.UpdateAttestor][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest} - */ -public final class UpdateAttestorRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - UpdateAttestorRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdateAttestorRequest.newBuilder() to construct. - private UpdateAttestorRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdateAttestorRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdateAttestorRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.Builder.class); - } - - public static final int ATTESTOR_FIELD_NUMBER = 1; - private com.google.cloud.binaryauthorization.v1beta1.Attestor attestor_; - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - @java.lang.Override - public boolean hasAttestor() { - return attestor_ != null; - } - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder() { - return getAttestor(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (attestor_ != null) { - output.writeMessage(1, getAttestor()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (attestor_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getAttestor()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest other = - (com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) obj; - - if (hasAttestor() != other.hasAttestor()) return false; - if (hasAttestor()) { - if (!getAttestor().equals(other.getAttestor())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasAttestor()) { - hash = (37 * hash) + ATTESTOR_FIELD_NUMBER; - hash = (53 * hash) + getAttestor().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.UpdateAttestor][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.class, - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (attestorBuilder_ == null) { - attestor_ = null; - } else { - attestor_ = null; - attestorBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdateAttestorRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - .getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest build() { - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest result = - new com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest(this); - if (attestorBuilder_ == null) { - result.attestor_ = attestor_; - } else { - result.attestor_ = attestorBuilder_.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.binaryauthorization.v1beta1.UpdateAttestorRequest) { - return mergeFrom( - (com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - .getDefaultInstance()) return this; - if (other.hasAttestor()) { - mergeAttestor(other.getAttestor()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getAttestorFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.cloud.binaryauthorization.v1beta1.Attestor attestor_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - attestorBuilder_; - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - public boolean hasAttestor() { - return attestorBuilder_ != null || attestor_ != null; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor() { - if (attestorBuilder_ == null) { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } else { - return attestorBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - attestor_ = value; - onChanged(); - } else { - attestorBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setAttestor( - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder builderForValue) { - if (attestorBuilder_ == null) { - attestor_ = builderForValue.build(); - onChanged(); - } else { - attestorBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergeAttestor(com.google.cloud.binaryauthorization.v1beta1.Attestor value) { - if (attestorBuilder_ == null) { - if (attestor_ != null) { - attestor_ = - com.google.cloud.binaryauthorization.v1beta1.Attestor.newBuilder(attestor_) - .mergeFrom(value) - .buildPartial(); - } else { - attestor_ = value; - } - onChanged(); - } else { - attestorBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearAttestor() { - if (attestorBuilder_ == null) { - attestor_ = null; - onChanged(); - } else { - attestor_ = null; - attestorBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder getAttestorBuilder() { - - onChanged(); - return getAttestorFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder() { - if (attestorBuilder_ != null) { - return attestorBuilder_.getMessageOrBuilder(); - } else { - return attestor_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Attestor.getDefaultInstance() - : attestor_; - } - } - /** - * - * - *
-     * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-     * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-     * in the request URL, in the format `projects/*/attestors/*`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder> - getAttestorFieldBuilder() { - if (attestorBuilder_ == null) { - attestorBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Attestor, - com.google.cloud.binaryauthorization.v1beta1.Attestor.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder>( - getAttestor(), getParentForChildren(), isClean()); - attestor_ = null; - } - return attestorBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdateAttestorRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java deleted file mode 100644 index b190c113..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdateAttestorRequestOrBuilder.java +++ /dev/null @@ -1,72 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface UpdateAttestorRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the attestor field is set. - */ - boolean hasAttestor(); - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The attestor. - */ - com.google.cloud.binaryauthorization.v1beta1.Attestor getAttestor(); - /** - * - * - *
-   * Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will
-   * overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name
-   * in the request URL, in the format `projects/*/attestors/*`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Attestor attestor = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AttestorOrBuilder getAttestorOrBuilder(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java deleted file mode 100644 index a7b1e1c6..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequest.java +++ /dev/null @@ -1,759 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * Request message for [BinauthzManagementService.UpdatePolicy][].
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest} - */ -public final class UpdatePolicyRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - UpdatePolicyRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use UpdatePolicyRequest.newBuilder() to construct. - private UpdatePolicyRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UpdatePolicyRequest() {} - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UpdatePolicyRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.Builder.class); - } - - public static final int POLICY_FIELD_NUMBER = 1; - private com.google.cloud.binaryauthorization.v1beta1.Policy policy_; - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - @java.lang.Override - public boolean hasPolicy() { - return policy_ != null; - } - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy() { - return policy_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.getDefaultInstance() - : policy_; - } - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder getPolicyOrBuilder() { - return getPolicy(); - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (policy_ != null) { - output.writeMessage(1, getPolicy()); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (policy_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest other = - (com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) obj; - - if (hasPolicy() != other.hasPolicy()) return false; - if (hasPolicy()) { - if (!getPolicy().equals(other.getPolicy())) return false; - } - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasPolicy()) { - hash = (37 * hash) + POLICY_FIELD_NUMBER; - hash = (53 * hash) + getPolicy().hashCode(); - } - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Request message for [BinauthzManagementService.UpdatePolicy][].
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.class, - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.Builder.class); - } - - // Construct using com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policyBuilder_ == null) { - policy_ = null; - } else { - policy_ = null; - policyBuilder_ = null; - } - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationServiceProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UpdatePolicyRequest_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest build() { - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest result = - new com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest(this); - if (policyBuilder_ == null) { - result.policy_ = policy_; - } else { - result.policy_ = policyBuilder_.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.binaryauthorization.v1beta1.UpdatePolicyRequest) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest.getDefaultInstance()) - return this; - if (other.hasPolicy()) { - mergePolicy(other.getPolicy()); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - input.readMessage(getPolicyFieldBuilder().getBuilder(), extensionRegistry); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private com.google.cloud.binaryauthorization.v1beta1.Policy policy_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Policy, - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder, - com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder> - policyBuilder_; - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - public boolean hasPolicy() { - return policyBuilder_ != null || policy_ != null; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - public com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy() { - if (policyBuilder_ == null) { - return policy_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.getDefaultInstance() - : policy_; - } else { - return policyBuilder_.getMessage(); - } - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy(com.google.cloud.binaryauthorization.v1beta1.Policy value) { - if (policyBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - policy_ = value; - onChanged(); - } else { - policyBuilder_.setMessage(value); - } - - return this; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder setPolicy( - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder builderForValue) { - if (policyBuilder_ == null) { - policy_ = builderForValue.build(); - onChanged(); - } else { - policyBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder mergePolicy(com.google.cloud.binaryauthorization.v1beta1.Policy value) { - if (policyBuilder_ == null) { - if (policy_ != null) { - policy_ = - com.google.cloud.binaryauthorization.v1beta1.Policy.newBuilder(policy_) - .mergeFrom(value) - .buildPartial(); - } else { - policy_ = value; - } - onChanged(); - } else { - policyBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public Builder clearPolicy() { - if (policyBuilder_ == null) { - policy_ = null; - onChanged(); - } else { - policy_ = null; - policyBuilder_ = null; - } - - return this; - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.Policy.Builder getPolicyBuilder() { - - onChanged(); - return getPolicyFieldBuilder().getBuilder(); - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder getPolicyOrBuilder() { - if (policyBuilder_ != null) { - return policyBuilder_.getMessageOrBuilder(); - } else { - return policy_ == null - ? com.google.cloud.binaryauthorization.v1beta1.Policy.getDefaultInstance() - : policy_; - } - } - /** - * - * - *
-     * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-     * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-     * the request URL, in the format `projects/*/policy`.
-     * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Policy, - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder, - com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder> - getPolicyFieldBuilder() { - if (policyBuilder_ == null) { - policyBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.Policy, - com.google.cloud.binaryauthorization.v1beta1.Policy.Builder, - com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder>( - getPolicy(), getParentForChildren(), isClean()); - policy_ = null; - } - return policyBuilder_; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - private static final com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UpdatePolicyRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java deleted file mode 100644 index e13358f7..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UpdatePolicyRequestOrBuilder.java +++ /dev/null @@ -1,72 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/service.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface UpdatePolicyRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return Whether the policy field is set. - */ - boolean hasPolicy(); - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * - * @return The policy. - */ - com.google.cloud.binaryauthorization.v1beta1.Policy getPolicy(); - /** - * - * - *
-   * Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will
-   * overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in
-   * the request URL, in the format `projects/*/policy`.
-   * 
- * - * - * .google.cloud.binaryauthorization.v1beta1.Policy policy = 1 [(.google.api.field_behavior) = REQUIRED]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.PolicyOrBuilder getPolicyOrBuilder(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java deleted file mode 100644 index 9abea7bc..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNote.java +++ /dev/null @@ -1,1599 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -/** - * - * - *
- * An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock
- * ATTESTATION_AUTHORITY Note created by the user.
- * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote} - */ -public final class UserOwnedDrydockNote extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - UserOwnedDrydockNoteOrBuilder { - private static final long serialVersionUID = 0L; - // Use UserOwnedDrydockNote.newBuilder() to construct. - private UserOwnedDrydockNote(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private UserOwnedDrydockNote() { - noteReference_ = ""; - publicKeys_ = java.util.Collections.emptyList(); - delegationServiceAccountEmail_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new UserOwnedDrydockNote(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.class, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder.class); - } - - public static final int NOTE_REFERENCE_FIELD_NUMBER = 1; - private volatile java.lang.Object noteReference_; - /** - * - * - *
-   * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-   * created by the user, in the format: `projects/*/notes/*` (or the legacy
-   * `providers/*/notes/*`). This field may not be updated.
-   * An attestation by this attestor is stored as a Drydock
-   * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-   * links to this Note. Drydock is an external dependency.
-   * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - @java.lang.Override - public java.lang.String getNoteReference() { - java.lang.Object ref = noteReference_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteReference_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-   * created by the user, in the format: `projects/*/notes/*` (or the legacy
-   * `providers/*/notes/*`). This field may not be updated.
-   * An attestation by this attestor is stored as a Drydock
-   * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-   * links to this Note. Drydock is an external dependency.
-   * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - @java.lang.Override - public com.google.protobuf.ByteString getNoteReferenceBytes() { - java.lang.Object ref = noteReference_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - noteReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PUBLIC_KEYS_FIELD_NUMBER = 2; - private java.util.List - publicKeys_; - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List - getPublicKeysList() { - return publicKeys_; - } - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public java.util.List< - ? extends com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder> - getPublicKeysOrBuilderList() { - return publicKeys_; - } - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public int getPublicKeysCount() { - return publicKeys_.size(); - } - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey getPublicKeys(int index) { - return publicKeys_.get(index); - } - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder - getPublicKeysOrBuilder(int index) { - return publicKeys_.get(index); - } - - public static final int DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER = 3; - private volatile java.lang.Object delegationServiceAccountEmail_; - /** - * - * - *
-   * Output only. This field will contain the service account email address
-   * that this Attestor will use as the principal when querying Container
-   * Analysis. Attestor administrators must grant this service account the
-   * IAM role needed to read attestations from the [note_reference][Note] in
-   * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-   * This email address is fixed for the lifetime of the Attestor, but callers
-   * should not make any other assumptions about the service account email;
-   * future versions may use an email based on a different naming pattern.
-   * 
- * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - @java.lang.Override - public java.lang.String getDelegationServiceAccountEmail() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - delegationServiceAccountEmail_ = s; - return s; - } - } - /** - * - * - *
-   * Output only. This field will contain the service account email address
-   * that this Attestor will use as the principal when querying Container
-   * Analysis. Attestor administrators must grant this service account the
-   * IAM role needed to read attestations from the [note_reference][Note] in
-   * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-   * This email address is fixed for the lifetime of the Attestor, but callers
-   * should not make any other assumptions about the service account email;
-   * future versions may use an email based on a different naming pattern.
-   * 
- * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - @java.lang.Override - public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - delegationServiceAccountEmail_ = 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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, noteReference_); - } - for (int i = 0; i < publicKeys_.size(); i++) { - output.writeMessage(2, publicKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, delegationServiceAccountEmail_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(noteReference_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, noteReference_); - } - for (int i = 0; i < publicKeys_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, publicKeys_.get(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(delegationServiceAccountEmail_)) { - size += - com.google.protobuf.GeneratedMessageV3.computeStringSize( - 3, delegationServiceAccountEmail_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote)) { - return super.equals(obj); - } - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote other = - (com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) obj; - - if (!getNoteReference().equals(other.getNoteReference())) return false; - if (!getPublicKeysList().equals(other.getPublicKeysList())) return false; - if (!getDelegationServiceAccountEmail().equals(other.getDelegationServiceAccountEmail())) - return false; - if (!getUnknownFields().equals(other.getUnknownFields())) 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) + NOTE_REFERENCE_FIELD_NUMBER; - hash = (53 * hash) + getNoteReference().hashCode(); - if (getPublicKeysCount() > 0) { - hash = (37 * hash) + PUBLIC_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getPublicKeysList().hashCode(); - } - hash = (37 * hash) + DELEGATION_SERVICE_ACCOUNT_EMAIL_FIELD_NUMBER; - hash = (53 * hash) + getDelegationServiceAccountEmail().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - parseDelimitedFrom( - java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( - PARSER, input, extensionRegistry); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException( - PARSER, input, extensionRegistry); - } - - @java.lang.Override - public Builder newBuilderForType() { - return newBuilder(); - } - - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - - public static Builder newBuilder( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new 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 [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock
-   * ATTESTATION_AUTHORITY Note created by the user.
-   * 
- * - * Protobuf type {@code google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNoteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.class, - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.Builder.class); - } - - // Construct using - // com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - noteReference_ = ""; - - if (publicKeysBuilder_ == null) { - publicKeys_ = java.util.Collections.emptyList(); - } else { - publicKeys_ = null; - publicKeysBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); - delegationServiceAccountEmail_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.binaryauthorization.v1beta1.BinaryAuthorizationResourcesProto - .internal_static_google_cloud_binaryauthorization_v1beta1_UserOwnedDrydockNote_descriptor; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - getDefaultInstanceForType() { - return com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote build() { - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote buildPartial() { - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote result = - new com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote(this); - int from_bitField0_ = bitField0_; - result.noteReference_ = noteReference_; - if (publicKeysBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - publicKeys_ = java.util.Collections.unmodifiableList(publicKeys_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.publicKeys_ = publicKeys_; - } else { - result.publicKeys_ = publicKeysBuilder_.build(); - } - result.delegationServiceAccountEmail_ = delegationServiceAccountEmail_; - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); - } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); - } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) { - return mergeFrom((com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom( - com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote other) { - if (other - == com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote.getDefaultInstance()) - return this; - if (!other.getNoteReference().isEmpty()) { - noteReference_ = other.noteReference_; - onChanged(); - } - if (publicKeysBuilder_ == null) { - if (!other.publicKeys_.isEmpty()) { - if (publicKeys_.isEmpty()) { - publicKeys_ = other.publicKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePublicKeysIsMutable(); - publicKeys_.addAll(other.publicKeys_); - } - onChanged(); - } - } else { - if (!other.publicKeys_.isEmpty()) { - if (publicKeysBuilder_.isEmpty()) { - publicKeysBuilder_.dispose(); - publicKeysBuilder_ = null; - publicKeys_ = other.publicKeys_; - bitField0_ = (bitField0_ & ~0x00000001); - publicKeysBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPublicKeysFieldBuilder() - : null; - } else { - publicKeysBuilder_.addAllMessages(other.publicKeys_); - } - } - } - if (!other.getDelegationServiceAccountEmail().isEmpty()) { - delegationServiceAccountEmail_ = other.delegationServiceAccountEmail_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - noteReference_ = input.readStringRequireUtf8(); - - break; - } // case 10 - case 18: - { - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey m = - input.readMessage( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.parser(), - extensionRegistry); - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(m); - } else { - publicKeysBuilder_.addMessage(m); - } - break; - } // case 18 - case 26: - { - delegationServiceAccountEmail_ = input.readStringRequireUtf8(); - - break; - } // case 26 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private int bitField0_; - - private java.lang.Object noteReference_ = ""; - /** - * - * - *
-     * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-     * created by the user, in the format: `projects/*/notes/*` (or the legacy
-     * `providers/*/notes/*`). This field may not be updated.
-     * An attestation by this attestor is stored as a Drydock
-     * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-     * links to this Note. Drydock is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - public java.lang.String getNoteReference() { - java.lang.Object ref = noteReference_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - noteReference_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-     * created by the user, in the format: `projects/*/notes/*` (or the legacy
-     * `providers/*/notes/*`). This field may not be updated.
-     * An attestation by this attestor is stored as a Drydock
-     * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-     * links to this Note. Drydock is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - public com.google.protobuf.ByteString getNoteReferenceBytes() { - java.lang.Object ref = noteReference_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - noteReference_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-     * created by the user, in the format: `projects/*/notes/*` (or the legacy
-     * `providers/*/notes/*`). This field may not be updated.
-     * An attestation by this attestor is stored as a Drydock
-     * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-     * links to this Note. Drydock is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The noteReference to set. - * @return This builder for chaining. - */ - public Builder setNoteReference(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - noteReference_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-     * created by the user, in the format: `projects/*/notes/*` (or the legacy
-     * `providers/*/notes/*`). This field may not be updated.
-     * An attestation by this attestor is stored as a Drydock
-     * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-     * links to this Note. Drydock is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearNoteReference() { - - noteReference_ = getDefaultInstance().getNoteReference(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-     * created by the user, in the format: `projects/*/notes/*` (or the legacy
-     * `providers/*/notes/*`). This field may not be updated.
-     * An attestation by this attestor is stored as a Drydock
-     * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-     * links to this Note. Drydock is an external dependency.
-     * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for noteReference to set. - * @return This builder for chaining. - */ - public Builder setNoteReferenceBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - noteReference_ = value; - onChanged(); - return this; - } - - private java.util.List - publicKeys_ = java.util.Collections.emptyList(); - - private void ensurePublicKeysIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - publicKeys_ = - new java.util.ArrayList( - publicKeys_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder> - publicKeysBuilder_; - - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPublicKeysList() { - if (publicKeysBuilder_ == null) { - return java.util.Collections.unmodifiableList(publicKeys_); - } else { - return publicKeysBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public int getPublicKeysCount() { - if (publicKeysBuilder_ == null) { - return publicKeys_.size(); - } else { - return publicKeysBuilder_.getCount(); - } - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey getPublicKeys(int index) { - if (publicKeysBuilder_ == null) { - return publicKeys_.get(index); - } else { - return publicKeysBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublicKeys( - int index, com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.set(index, value); - onChanged(); - } else { - publicKeysBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder setPublicKeys( - int index, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.set(index, builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.add(value); - onChanged(); - } else { - publicKeysBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - int index, com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey value) { - if (publicKeysBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePublicKeysIsMutable(); - publicKeys_.add(index, value); - onChanged(); - } else { - publicKeysBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addPublicKeys( - int index, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder builderForValue) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.add(index, builderForValue.build()); - onChanged(); - } else { - publicKeysBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder addAllPublicKeys( - java.lang.Iterable - values) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, publicKeys_); - onChanged(); - } else { - publicKeysBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder clearPublicKeys() { - if (publicKeysBuilder_ == null) { - publicKeys_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - publicKeysBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public Builder removePublicKeys(int index) { - if (publicKeysBuilder_ == null) { - ensurePublicKeysIsMutable(); - publicKeys_.remove(index); - onChanged(); - } else { - publicKeysBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder - getPublicKeysBuilder(int index) { - return getPublicKeysFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder - getPublicKeysOrBuilder(int index) { - if (publicKeysBuilder_ == null) { - return publicKeys_.get(index); - } else { - return publicKeysBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List< - ? extends com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder> - getPublicKeysOrBuilderList() { - if (publicKeysBuilder_ != null) { - return publicKeysBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(publicKeys_); - } - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder - addPublicKeysBuilder() { - return getPublicKeysFieldBuilder() - .addBuilder( - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder - addPublicKeysBuilder(int index) { - return getPublicKeysFieldBuilder() - .addBuilder( - index, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.getDefaultInstance()); - } - /** - * - * - *
-     * Optional. Public keys that verify attestations signed by this
-     * attestor.  This field may be updated.
-     * If this field is non-empty, one of the specified public keys must
-     * verify that an attestation was signed by this attestor for the
-     * image specified in the admission request.
-     * If this field is empty, this attestor always returns that no
-     * valid attestations exist.
-     * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - public java.util.List - getPublicKeysBuilderList() { - return getPublicKeysFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder> - getPublicKeysFieldBuilder() { - if (publicKeysBuilder_ == null) { - publicKeysBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey.Builder, - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder>( - publicKeys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - publicKeys_ = null; - } - return publicKeysBuilder_; - } - - private java.lang.Object delegationServiceAccountEmail_ = ""; - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - public java.lang.String getDelegationServiceAccountEmail() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - delegationServiceAccountEmail_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - public com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes() { - java.lang.Object ref = delegationServiceAccountEmail_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - delegationServiceAccountEmail_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The delegationServiceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setDelegationServiceAccountEmail(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - delegationServiceAccountEmail_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearDelegationServiceAccountEmail() { - - delegationServiceAccountEmail_ = getDefaultInstance().getDelegationServiceAccountEmail(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. This field will contain the service account email address
-     * that this Attestor will use as the principal when querying Container
-     * Analysis. Attestor administrators must grant this service account the
-     * IAM role needed to read attestations from the [note_reference][Note] in
-     * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-     * This email address is fixed for the lifetime of the Attestor, but callers
-     * should not make any other assumptions about the service account email;
-     * future versions may use an email based on a different naming pattern.
-     * 
- * - * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The bytes for delegationServiceAccountEmail to set. - * @return This builder for chaining. - */ - public Builder setDelegationServiceAccountEmailBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - delegationServiceAccountEmail_ = 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.binaryauthorization.v1beta1.UserOwnedDrydockNote) - } - - // @@protoc_insertion_point(class_scope:google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - private static final com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote(); - } - - public static com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public UserOwnedDrydockNote parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNoteOrBuilder.java b/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNoteOrBuilder.java deleted file mode 100644 index 5a2c8227..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/java/com/google/cloud/binaryauthorization/v1beta1/UserOwnedDrydockNoteOrBuilder.java +++ /dev/null @@ -1,195 +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. - */ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/cloud/binaryauthorization/v1beta1/resources.proto - -package com.google.cloud.binaryauthorization.v1beta1; - -public interface UserOwnedDrydockNoteOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-   * created by the user, in the format: `projects/*/notes/*` (or the legacy
-   * `providers/*/notes/*`). This field may not be updated.
-   * An attestation by this attestor is stored as a Drydock
-   * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-   * links to this Note. Drydock is an external dependency.
-   * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The noteReference. - */ - java.lang.String getNoteReference(); - /** - * - * - *
-   * Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note,
-   * created by the user, in the format: `projects/*/notes/*` (or the legacy
-   * `providers/*/notes/*`). This field may not be updated.
-   * An attestation by this attestor is stored as a Drydock
-   * ATTESTATION_AUTHORITY Occurrence that names a container image and that
-   * links to this Note. Drydock is an external dependency.
-   * 
- * - * string note_reference = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for noteReference. - */ - com.google.protobuf.ByteString getNoteReferenceBytes(); - - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getPublicKeysList(); - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKey getPublicKeys(int index); - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - int getPublicKeysCount(); - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - java.util.List - getPublicKeysOrBuilderList(); - /** - * - * - *
-   * Optional. Public keys that verify attestations signed by this
-   * attestor.  This field may be updated.
-   * If this field is non-empty, one of the specified public keys must
-   * verify that an attestation was signed by this attestor for the
-   * image specified in the admission request.
-   * If this field is empty, this attestor always returns that no
-   * valid attestations exist.
-   * 
- * - * - * repeated .google.cloud.binaryauthorization.v1beta1.AttestorPublicKey public_keys = 2 [(.google.api.field_behavior) = OPTIONAL]; - * - */ - com.google.cloud.binaryauthorization.v1beta1.AttestorPublicKeyOrBuilder getPublicKeysOrBuilder( - int index); - - /** - * - * - *
-   * Output only. This field will contain the service account email address
-   * that this Attestor will use as the principal when querying Container
-   * Analysis. Attestor administrators must grant this service account the
-   * IAM role needed to read attestations from the [note_reference][Note] in
-   * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-   * This email address is fixed for the lifetime of the Attestor, but callers
-   * should not make any other assumptions about the service account email;
-   * future versions may use an email based on a different naming pattern.
-   * 
- * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The delegationServiceAccountEmail. - */ - java.lang.String getDelegationServiceAccountEmail(); - /** - * - * - *
-   * Output only. This field will contain the service account email address
-   * that this Attestor will use as the principal when querying Container
-   * Analysis. Attestor administrators must grant this service account the
-   * IAM role needed to read attestations from the [note_reference][Note] in
-   * Container Analysis (`containeranalysis.notes.occurrences.viewer`).
-   * This email address is fixed for the lifetime of the Attestor, but callers
-   * should not make any other assumptions about the service account email;
-   * future versions may use an email based on a different naming pattern.
-   * 
- * - * string delegation_service_account_email = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The bytes for delegationServiceAccountEmail. - */ - com.google.protobuf.ByteString getDelegationServiceAccountEmailBytes(); -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto deleted file mode 100644 index 1666b518..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/continuous_validation_logging.proto +++ /dev/null @@ -1,100 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.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.binaryauthorization.v1beta1; - -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization"; -option java_multiple_files = true; -option java_outer_classname = "ContinuousValidationLoggingProto"; -option java_package = "com.google.cloud.binaryauthorization.v1beta1"; -option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1"; -option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; - -// Represents an auditing event from Continuous Validation. -message ContinuousValidationEvent { - // An auditing event for one Pod. - message ContinuousValidationPodEvent { - // Audit time policy conformance verdict. - enum PolicyConformanceVerdict { - // We should always have a verdict. This is an error. - POLICY_CONFORMANCE_VERDICT_UNSPECIFIED = 0; - - // The pod violates the policy. - VIOLATES_POLICY = 1; - } - - // Container image with auditing details. - message ImageDetails { - // Result of the audit. - enum AuditResult { - // Unspecified result. This is an error. - AUDIT_RESULT_UNSPECIFIED = 0; - - // Image is allowed. - ALLOW = 1; - - // Image is denied. - DENY = 2; - } - - // The name of the image. - string image = 1; - - // The result of the audit for this image. - AuditResult result = 2; - - // Description of the above result. - string description = 3; - } - - // The k8s namespace of the Pod. - string pod_namespace = 7; - - // The name of the Pod. - string pod = 1; - - // Deploy time of the Pod from k8s. - google.protobuf.Timestamp deploy_time = 2; - - // Termination time of the Pod from k8s, or nothing if still running. - google.protobuf.Timestamp end_time = 3; - - // Auditing verdict for this Pod. - PolicyConformanceVerdict verdict = 4; - - // List of images with auditing details. - repeated ImageDetails images = 5; - } - - // An event describing that the project policy is unsupported by CV. - message UnsupportedPolicyEvent { - // A description of the unsupported policy. - string description = 1; - } - - // Type of CV event. - oneof event_type { - // Pod event. - ContinuousValidationPodEvent pod_event = 1; - - // Unsupported policy event. - UnsupportedPolicyEvent unsupported_policy_event = 2; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto deleted file mode 100644 index 28c18f99..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/resources.proto +++ /dev/null @@ -1,343 +0,0 @@ -// 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.binaryauthorization.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization"; -option java_multiple_files = true; -option java_outer_classname = "BinaryAuthorizationResourcesProto"; -option java_package = "com.google.cloud.binaryauthorization.v1beta1"; -option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1"; -option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; - -// A [policy][google.cloud.binaryauthorization.v1beta1.Policy] for Binary Authorization. -message Policy { - option (google.api.resource) = { - type: "binaryauthorization.googleapis.com/Policy" - pattern: "projects/{project}/policy" - pattern: "locations/{location}/policy" - }; - - enum GlobalPolicyEvaluationMode { - // Not specified: DISABLE is assumed. - GLOBAL_POLICY_EVALUATION_MODE_UNSPECIFIED = 0; - - // Enables system policy evaluation. - ENABLE = 1; - - // Disables system policy evaluation. - DISABLE = 2; - } - - // Output only. The resource name, in the format `projects/*/policy`. There is - // at most one policy per project. - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. A descriptive comment. - string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Controls the evaluation of a Google-maintained global admission - // policy for common system-level images. Images not covered by the global - // policy will be subject to the project admission policy. This setting - // has no effect when specified inside a global admission policy. - GlobalPolicyEvaluationMode global_policy_evaluation_mode = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Admission policy allowlisting. A matching admission request will - // always be permitted. This feature is typically used to exclude Google or - // third-party infrastructure images from Binary Authorization policies. - repeated AdmissionWhitelistPattern admission_whitelist_patterns = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-cluster admission rules. Cluster spec format: - // `location.clusterId`. There can be at most one admission rule per cluster - // spec. - // A `location` is either a compute zone (e.g. us-central1-a) or a region - // (e.g. us-central1). - // For `clusterId` syntax restrictions see - // https://cloud.google.com/container-engine/reference/rest/v1/projects.zones.clusters. - map cluster_admission_rules = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-kubernetes-namespace admission rules. K8s namespace spec format: - // `[a-z.-]+`, e.g. `some-namespace` - map kubernetes_namespace_admission_rules = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-kubernetes-service-account admission rules. Service account - // spec format: `namespace:serviceaccount`. e.g. `test-ns:default` - map kubernetes_service_account_admission_rules = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Per-istio-service-identity admission rules. Istio service - // identity spec format: - // `spiffe:///ns//sa/` or - // `/ns//sa/` - // e.g. `spiffe://example.com/ns/test-ns/sa/default` - map istio_service_identity_admission_rules = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Default admission rule for a cluster without a per-cluster, per- - // kubernetes-service-account, or per-istio-service-identity admission rule. - AdmissionRule default_admission_rule = 4 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Time when the policy was last updated. - google.protobuf.Timestamp update_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// An [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] exempts images -// from checks by [admission rules][google.cloud.binaryauthorization.v1beta1.AdmissionRule]. -message AdmissionWhitelistPattern { - // An image name pattern to allowlist, in the form `registry/path/to/image`. - // This supports a trailing `*` as a wildcard, but this is allowed only in - // text after the `registry/` part. `*` wildcard does not match `/`, i.e., - // `gcr.io/nginx*` matches `gcr.io/nginx@latest`, but it does not match - // `gcr.io/nginx/image`. This also supports a trailing `**` wildcard which - // matches subdirectories, i.e., `gcr.io/nginx**` matches - // `gcr.io/nginx/image`. - string name_pattern = 1; -} - -// An [admission rule][google.cloud.binaryauthorization.v1beta1.AdmissionRule] specifies either that all container images -// used in a pod creation request must be attested to by one or more -// [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], that all pod creations will be allowed, or that all -// pod creations will be denied. -// -// Images matching an [admission allowlist pattern][google.cloud.binaryauthorization.v1beta1.AdmissionWhitelistPattern] -// are exempted from admission rules and will never block a pod creation. -message AdmissionRule { - enum EvaluationMode { - // Do not use. - EVALUATION_MODE_UNSPECIFIED = 0; - - // This rule allows all all pod creations. - ALWAYS_ALLOW = 1; - - // This rule allows a pod creation if all the attestors listed in - // `require_attestations_by` have valid attestations for all of the - // images in the pod spec. - REQUIRE_ATTESTATION = 2; - - // This rule denies all pod creations. - ALWAYS_DENY = 3; - } - - // Defines the possible actions when a pod creation is denied by an admission - // rule. - enum EnforcementMode { - // Do not use. - ENFORCEMENT_MODE_UNSPECIFIED = 0; - - // Enforce the admission rule by blocking the pod creation. - ENFORCED_BLOCK_AND_AUDIT_LOG = 1; - - // Dryrun mode: Audit logging only. This will allow the pod creation as if - // the admission request had specified break-glass. - DRYRUN_AUDIT_LOG_ONLY = 2; - } - - // Required. How this admission rule will be evaluated. - EvaluationMode evaluation_mode = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The resource names of the attestors that must attest to - // a container image, in the format `projects/*/attestors/*`. Each - // attestor must exist before a policy can reference it. To add an attestor - // to a policy the principal issuing the policy change request must be able - // to read the attestor resource. - // - // Note: this field must be non-empty when the evaluation_mode field specifies - // REQUIRE_ATTESTATION, otherwise it must be empty. - repeated string require_attestations_by = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The action when a pod creation is denied by the admission rule. - EnforcementMode enforcement_mode = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// An [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to container image -// artifacts. An existing attestor cannot be modified except where -// indicated. -message Attestor { - option (google.api.resource) = { - type: "binaryauthorization.googleapis.com/Attestor" - pattern: "projects/{project}/attestors/{attestor}" - }; - - // Required. The resource name, in the format: - // `projects/*/attestors/*`. This field may not be updated. - string name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. A descriptive comment. This field may be updated. - // The field may be displayed in chooser dialogs. - string description = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Identifies an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] that attests to a - // container image artifact. This determines how an attestation will - // be stored, and how it will be used during policy - // enforcement. Updates may not change the attestor type, but individual - // attestor fields may be updated. - oneof attestor_type { - // A Drydock ATTESTATION_AUTHORITY Note, created by the user. - UserOwnedDrydockNote user_owned_drydock_note = 3; - } - - // Output only. Time when the attestor was last updated. - google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// An [user owned drydock note][google.cloud.binaryauthorization.v1beta1.UserOwnedDrydockNote] references a Drydock -// ATTESTATION_AUTHORITY Note created by the user. -message UserOwnedDrydockNote { - // Required. The Drydock resource name of a ATTESTATION_AUTHORITY Note, - // created by the user, in the format: `projects/*/notes/*` (or the legacy - // `providers/*/notes/*`). This field may not be updated. - // - // An attestation by this attestor is stored as a Drydock - // ATTESTATION_AUTHORITY Occurrence that names a container image and that - // links to this Note. Drydock is an external dependency. - string note_reference = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Public keys that verify attestations signed by this - // attestor. This field may be updated. - // - // If this field is non-empty, one of the specified public keys must - // verify that an attestation was signed by this attestor for the - // image specified in the admission request. - // - // If this field is empty, this attestor always returns that no - // valid attestations exist. - repeated AttestorPublicKey public_keys = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. This field will contain the service account email address - // that this Attestor will use as the principal when querying Container - // Analysis. Attestor administrators must grant this service account the - // IAM role needed to read attestations from the [note_reference][Note] in - // Container Analysis (`containeranalysis.notes.occurrences.viewer`). - // - // This email address is fixed for the lifetime of the Attestor, but callers - // should not make any other assumptions about the service account email; - // future versions may use an email based on a different naming pattern. - string delegation_service_account_email = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A public key in the PkixPublicKey format (see -// https://tools.ietf.org/html/rfc5280#section-4.1.2.7 for details). -// Public keys of this type are typically textually encoded using the PEM -// format. -message PkixPublicKey { - // Represents a signature algorithm and other information necessary to verify - // signatures with a given public key. - // This is based primarily on the public key types supported by Tink's - // PemKeyType, which is in turn based on KMS's supported signing algorithms. - // See https://cloud.google.com/kms/docs/algorithms. In the future, BinAuthz - // might support additional public key types independently of Tink and/or KMS. - enum SignatureAlgorithm { - option allow_alias = true; - - // Not specified. - SIGNATURE_ALGORITHM_UNSPECIFIED = 0; - - // RSASSA-PSS 2048 bit key with a SHA256 digest. - RSA_PSS_2048_SHA256 = 1; - - // RSASSA-PSS 3072 bit key with a SHA256 digest. - RSA_PSS_3072_SHA256 = 2; - - // RSASSA-PSS 4096 bit key with a SHA256 digest. - RSA_PSS_4096_SHA256 = 3; - - // RSASSA-PSS 4096 bit key with a SHA512 digest. - RSA_PSS_4096_SHA512 = 4; - - // RSASSA-PKCS1-v1_5 with a 2048 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_2048_SHA256 = 5; - - // RSASSA-PKCS1-v1_5 with a 3072 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_3072_SHA256 = 6; - - // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA256 digest. - RSA_SIGN_PKCS1_4096_SHA256 = 7; - - // RSASSA-PKCS1-v1_5 with a 4096 bit key and a SHA512 digest. - RSA_SIGN_PKCS1_4096_SHA512 = 8; - - // ECDSA on the NIST P-256 curve with a SHA256 digest. - ECDSA_P256_SHA256 = 9; - - // ECDSA on the NIST P-256 curve with a SHA256 digest. - EC_SIGN_P256_SHA256 = 9; - - // ECDSA on the NIST P-384 curve with a SHA384 digest. - ECDSA_P384_SHA384 = 10; - - // ECDSA on the NIST P-384 curve with a SHA384 digest. - EC_SIGN_P384_SHA384 = 10; - - // ECDSA on the NIST P-521 curve with a SHA512 digest. - ECDSA_P521_SHA512 = 11; - - // ECDSA on the NIST P-521 curve with a SHA512 digest. - EC_SIGN_P521_SHA512 = 11; - } - - // A PEM-encoded public key, as described in - // https://tools.ietf.org/html/rfc7468#section-13 - string public_key_pem = 1; - - // The signature algorithm used to verify a message against a signature using - // this key. - // These signature algorithm must match the structure and any object - // identifiers encoded in `public_key_pem` (i.e. this algorithm must match - // that of the public key). - SignatureAlgorithm signature_algorithm = 2; -} - -// An [attestor public key][google.cloud.binaryauthorization.v1beta1.AttestorPublicKey] that will be used to verify -// attestations signed by this attestor. -message AttestorPublicKey { - // Optional. A descriptive comment. This field may be updated. - string comment = 1 [(google.api.field_behavior) = OPTIONAL]; - - // The ID of this public key. - // Signatures verified by BinAuthz must include the ID of the public key that - // can be used to verify them, and that ID must match the contents of this - // field exactly. - // Additional restrictions on this field can be imposed based on which public - // key type is encapsulated. See the documentation on `public_key` cases below - // for details. - string id = 2; - - // Required. A public key reference or serialized instance. This field may be - // updated. - oneof public_key { - // ASCII-armored representation of a PGP public key, as the entire output by - // the command `gpg --export --armor foo@example.com` (either LF or CRLF - // line endings). - // When using this field, `id` should be left blank. The BinAuthz API - // handlers will calculate the ID and fill it in automatically. BinAuthz - // computes this ID as the OpenPGP RFC4880 V4 fingerprint, represented as - // upper-case hex. If `id` is provided by the caller, it will be - // overwritten by the API-calculated ID. - string ascii_armored_pgp_public_key = 3; - - // A raw PKIX SubjectPublicKeyInfo format public key. - // - // NOTE: `id` may be explicitly provided by the caller when using this - // type of public key, but it MUST be a valid RFC3986 URI. If `id` is left - // blank, a default one will be computed based on the digest of the DER - // encoding of the public key. - PkixPublicKey pkix_public_key = 5; - } -} diff --git a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto b/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto deleted file mode 100644 index 90e63b4d..00000000 --- a/proto-google-cloud-binary-authorization-v1beta1/src/main/proto/google/cloud/binaryauthorization/v1beta1/service.proto +++ /dev/null @@ -1,252 +0,0 @@ -// 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.binaryauthorization.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/binaryauthorization/v1beta1/resources.proto"; -import "google/protobuf/empty.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.BinaryAuthorization.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/binaryauthorization/v1beta1;binaryauthorization"; -option java_multiple_files = true; -option java_outer_classname = "BinaryAuthorizationServiceProto"; -option java_package = "com.google.cloud.binaryauthorization.v1beta1"; -option php_namespace = "Google\\Cloud\\BinaryAuthorization\\V1beta1"; -option ruby_package = "Google::Cloud::BinaryAuthorization::V1beta1"; - -// Customer-facing API for Cloud Binary Authorization. - -// Google Cloud Management Service for Binary Authorization admission policies -// and attestation authorities. -// -// This API implements a REST model with the following objects: -// -// * [Policy][google.cloud.binaryauthorization.v1beta1.Policy] -// * [Attestor][google.cloud.binaryauthorization.v1beta1.Attestor] -service BinauthzManagementServiceV1Beta1 { - option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // A [policy][google.cloud.binaryauthorization.v1beta1.Policy] specifies the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] that must attest to - // a container image, before the project is allowed to deploy that - // image. There is at most one policy per project. All image admission - // requests are permitted if a project has no policy. - // - // Gets the [policy][google.cloud.binaryauthorization.v1beta1.Policy] for this project. Returns a default - // [policy][google.cloud.binaryauthorization.v1beta1.Policy] if the project does not have one. - rpc GetPolicy(GetPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/policy}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates or updates a project's [policy][google.cloud.binaryauthorization.v1beta1.Policy], and returns a copy of the - // new [policy][google.cloud.binaryauthorization.v1beta1.Policy]. A policy is always updated as a whole, to avoid race - // conditions with concurrent policy enforcement (or management!) - // requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT - // if the request is malformed. - rpc UpdatePolicy(UpdatePolicyRequest) returns (Policy) { - option (google.api.http) = { - put: "/v1beta1/{policy.name=projects/*/policy}" - body: "policy" - }; - option (google.api.method_signature) = "policy"; - } - - // Creates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor], and returns a copy of the new - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the project does not exist, - // INVALID_ARGUMENT if the request is malformed, ALREADY_EXISTS if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] already exists. - rpc CreateAttestor(CreateAttestorRequest) returns (Attestor) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*}/attestors" - body: "attestor" - }; - option (google.api.method_signature) = "parent,attestor_id,attestor"; - } - - // Gets an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc GetAttestor(GetAttestorRequest) returns (Attestor) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/attestors/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns NOT_FOUND if the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc UpdateAttestor(UpdateAttestorRequest) returns (Attestor) { - option (google.api.http) = { - put: "/v1beta1/{attestor.name=projects/*/attestors/*}" - body: "attestor" - }; - option (google.api.method_signature) = "attestor"; - } - - // Lists [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. - // Returns INVALID_ARGUMENT if the project does not exist. - rpc ListAttestors(ListAttestorsRequest) returns (ListAttestorsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*}/attestors" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes an [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. Returns NOT_FOUND if the - // [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] does not exist. - rpc DeleteAttestor(DeleteAttestorRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/attestors/*}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for [BinauthzManagementService.GetPolicy][]. -message GetPolicyRequest { - // Required. The resource name of the [policy][google.cloud.binaryauthorization.v1beta1.Policy] to retrieve, - // in the format `projects/*/policy`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Policy" - } - ]; -} - -// API for working with the system policy. -service SystemPolicyV1Beta1 { - option (google.api.default_host) = "binaryauthorization.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Gets the current system policy in the specified location. - rpc GetSystemPolicy(GetSystemPolicyRequest) returns (Policy) { - option (google.api.http) = { - get: "/v1beta1/{name=locations/*/policy}" - }; - option (google.api.method_signature) = "name"; - } -} - -// Request message for [BinauthzManagementService.UpdatePolicy][]. -message UpdatePolicyRequest { - // Required. A new or updated [policy][google.cloud.binaryauthorization.v1beta1.Policy] value. The service will - // overwrite the [policy name][google.cloud.binaryauthorization.v1beta1.Policy.name] field with the resource name in - // the request URL, in the format `projects/*/policy`. - Policy policy = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.CreateAttestor][]. -message CreateAttestorRequest { - // Required. The parent of this [attestor][google.cloud.binaryauthorization.v1beta1.Attestor]. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Required. The [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] ID. - string attestor_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The initial [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will - // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name, - // in the format `projects/*/attestors/*`. - Attestor attestor = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.GetAttestor][]. -message GetAttestorRequest { - // Required. The name of the [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] to retrieve, in the format - // `projects/*/attestors/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Attestor" - } - ]; -} - -// Request message for [BinauthzManagementService.UpdateAttestor][]. -message UpdateAttestorRequest { - // Required. The updated [attestor][google.cloud.binaryauthorization.v1beta1.Attestor] value. The service will - // overwrite the [attestor name][google.cloud.binaryauthorization.v1beta1.Attestor.name] field with the resource name - // in the request URL, in the format `projects/*/attestors/*`. - Attestor attestor = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for [BinauthzManagementService.ListAttestors][]. -message ListAttestorsRequest { - // Required. The resource name of the project associated with the - // [attestors][google.cloud.binaryauthorization.v1beta1.Attestor], in the format `projects/*`. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "cloudresourcemanager.googleapis.com/Project" - } - ]; - - // Requested page size. The server may return fewer results than requested. If - // unspecified, the server will pick an appropriate default. - int32 page_size = 2; - - // A token identifying a page of results the server should return. Typically, - // this is the value of [ListAttestorsResponse.next_page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse.next_page_token] returned - // from the previous call to the `ListAttestors` method. - string page_token = 3; -} - -// Response message for [BinauthzManagementService.ListAttestors][]. -message ListAttestorsResponse { - // The list of [attestors][google.cloud.binaryauthorization.v1beta1.Attestor]. - repeated Attestor attestors = 1; - - // A token to retrieve the next page of results. Pass this value in the - // [ListAttestorsRequest.page_token][google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest.page_token] field in the subsequent call to the - // `ListAttestors` method to retrieve the next page of results. - string next_page_token = 2; -} - -// Request message for [BinauthzManagementService.DeleteAttestor][]. -message DeleteAttestorRequest { - // Required. The name of the [attestors][google.cloud.binaryauthorization.v1beta1.Attestor] to delete, in the format - // `projects/*/attestors/*`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Attestor" - } - ]; -} - -// Request to read the current system policy. -message GetSystemPolicyRequest { - // Required. The resource name, in the format `locations/*/policy`. - // Note that the system policy is not associated with a project. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "binaryauthorization.googleapis.com/Policy" - } - ]; -} diff --git a/renovate.json b/renovate.json deleted file mode 100644 index d2be2000..00000000 --- a/renovate.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "enabled": false, - "extends": [ - ":separateMajorReleases", - ":combinePatchMinorReleases", - ":ignoreUnstable", - ":prImmediately", - ":updateNotScheduled", - ":automergeDisabled", - ":ignoreModulesAndTests", - ":maintainLockFilesDisabled", - ":autodetectPinVersions" - ], - "ignorePaths": [".kokoro/requirements.txt"], - "packageRules": [ - { - "packagePatterns": [ - "^com.google.guava:" - ], - "versionScheme": "docker" - }, - { - "packagePatterns": [ - "*" - ], - "semanticCommitType": "deps", - "semanticCommitScope": null - }, - { - "packagePatterns": [ - "^org.apache.maven", - "^org.jacoco:", - "^org.codehaus.mojo:", - "^org.sonatype.plugins:", - "^com.coveo:", - "^com.google.cloud:google-cloud-shared-config" - ], - "semanticCommitType": "build", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^com.google.cloud:google-cloud-binary-authorization", - "^com.google.cloud:libraries-bom", - "^com.google.cloud.samples:shared-configuration" - ], - "semanticCommitType": "chore", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^junit:junit", - "^com.google.truth:truth", - "^org.mockito:mockito-core", - "^org.objenesis:objenesis", - "^com.google.cloud:google-cloud-conformance-tests" - ], - "semanticCommitType": "test", - "semanticCommitScope": "deps" - }, - { - "packagePatterns": [ - "^com.google.cloud:google-cloud-" - ], - "ignoreUnstable": false - }, - { - "packagePatterns": [ - "^com.fasterxml.jackson.core" - ], - "groupName": "jackson dependencies" - } - ], - "semanticCommits": true, - "dependencyDashboard": true -} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml deleted file mode 100644 index 702955ca..00000000 --- a/samples/install-without-bom/pom.xml +++ /dev/null @@ -1,84 +0,0 @@ - - - 4.0.0 - com.google.cloud - binary-authorization-install-without-bom - jar - Google Binary Authorization Install Without Bom - https://github.com/googleapis/java-binary-authorization - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - - com.google.cloud - google-cloud-binary-authorization - 0.4.1 - - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - - diff --git a/samples/pom.xml b/samples/pom.xml deleted file mode 100644 index 6e904ab9..00000000 --- a/samples/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - 4.0.0 - com.google.cloud - google-cloud-binary-authorization-samples - 0.0.1-SNAPSHOT - pom - Google Binary Authorization Samples Parent - https://github.com/googleapis/java-binary-authorization - - Java idiomatic client for Google Cloud Platform services. - - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - install-without-bom - snapshot - snippets - - - - - - org.apache.maven.plugins - maven-deploy-plugin - 3.0.0 - - true - - - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 - - true - - - - - diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml deleted file mode 100644 index 7d4c4c04..00000000 --- a/samples/snapshot/pom.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - 4.0.0 - com.google.cloud - binary-authorization-snapshot - jar - Google Binary Authorization Snapshot Samples - https://github.com/googleapis/java-binary-authorization - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-binary-authorization - 0.4.1 - - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 3.3.0 - - - add-snippets-source - - add-source - - - - ../snippets/src/main/java - - - - - add-snippets-tests - - add-test-source - - - - ../snippets/src/test/java - - - - - - - - \ No newline at end of file diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 38181a55..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; -import com.google.cloud.binaryauthorization.v1beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - BinauthzManagementServiceV1Beta1Settings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 5f9d66a3..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider1_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - BinauthzManagementServiceV1Beta1Settings.newHttpJsonBuilder().build(); - BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java deleted file mode 100644 index e46077c6..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetEndpoint_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; -import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - BinauthzManagementServiceV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build(); - BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create(binauthzManagementServiceV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java deleted file mode 100644 index 6200c211..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/AsyncCreateAttestor.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class AsyncCreateAttestor { - - public static void main(String[] args) throws Exception { - asyncCreateAttestor(); - } - - public static void asyncCreateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - CreateAttestorRequest request = - CreateAttestorRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setAttestorId("attestorId2055733027") - .setAttestor(Attestor.newBuilder().build()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.createAttestorCallable().futureCall(request); - // Do something. - Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java deleted file mode 100644 index a16a9acb..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestor.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.CreateAttestorRequest; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncCreateAttestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestor(); - } - - public static void syncCreateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - CreateAttestorRequest request = - CreateAttestorRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setAttestorId("attestorId2055733027") - .setAttestor(Attestor.newBuilder().build()) - .build(); - Attestor response = binauthzManagementServiceV1Beta1Client.createAttestor(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java deleted file mode 100644 index 297616a6..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorProjectnameStringAttestor.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_ProjectnameStringAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncCreateAttestorProjectnameStringAttestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestorProjectnameStringAttestor(); - } - - public static void syncCreateAttestorProjectnameStringAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - Attestor response = - binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_ProjectnameStringAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java deleted file mode 100644 index 328d1738..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/createattestor/SyncCreateAttestorStringStringAttestor.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_StringStringAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncCreateAttestorStringStringAttestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestorStringStringAttestor(); - } - - public static void syncCreateAttestorStringStringAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - String attestorId = "attestorId2055733027"; - Attestor attestor = Attestor.newBuilder().build(); - Attestor response = - binauthzManagementServiceV1Beta1Client.createAttestor(parent, attestorId, attestor); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_CreateAttestor_StringStringAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java deleted file mode 100644 index 50ae3564..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/AsyncDeleteAttestor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.protobuf.Empty; - -public class AsyncDeleteAttestor { - - public static void main(String[] args) throws Exception { - asyncDeleteAttestor(); - } - - public static void asyncDeleteAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - DeleteAttestorRequest request = - DeleteAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.deleteAttestorCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java deleted file mode 100644 index 1480e2ef..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.DeleteAttestorRequest; -import com.google.protobuf.Empty; - -public class SyncDeleteAttestor { - - public static void main(String[] args) throws Exception { - syncDeleteAttestor(); - } - - public static void syncDeleteAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - DeleteAttestorRequest request = - DeleteAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - binauthzManagementServiceV1Beta1Client.deleteAttestor(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java deleted file mode 100644 index 2b19e5cc..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorAttestorname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_Attestorname_sync] -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.protobuf.Empty; - -public class SyncDeleteAttestorAttestorname { - - public static void main(String[] args) throws Exception { - syncDeleteAttestorAttestorname(); - } - - public static void syncDeleteAttestorAttestorname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - binauthzManagementServiceV1Beta1Client.deleteAttestor(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java deleted file mode 100644 index 6c5fbb8d..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/deleteattestor/SyncDeleteAttestorString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_String_sync] -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.protobuf.Empty; - -public class SyncDeleteAttestorString { - - public static void main(String[] args) throws Exception { - syncDeleteAttestorString(); - } - - public static void syncDeleteAttestorString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); - binauthzManagementServiceV1Beta1Client.deleteAttestor(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_DeleteAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java deleted file mode 100644 index 55c881a4..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/AsyncGetAttestor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; - -public class AsyncGetAttestor { - - public static void main(String[] args) throws Exception { - asyncGetAttestor(); - } - - public static void asyncGetAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - GetAttestorRequest request = - GetAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.getAttestorCallable().futureCall(request); - // Do something. - Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java deleted file mode 100644 index cd678429..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.GetAttestorRequest; - -public class SyncGetAttestor { - - public static void main(String[] args) throws Exception { - syncGetAttestor(); - } - - public static void syncGetAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - GetAttestorRequest request = - GetAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java deleted file mode 100644 index 38757d7a..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorAttestorname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_Attestorname_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; - -public class SyncGetAttestorAttestorname { - - public static void main(String[] args) throws Exception { - syncGetAttestorAttestorname(); - } - - public static void syncGetAttestorAttestorname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java deleted file mode 100644 index afbd0001..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getattestor/SyncGetAttestorString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_String_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.AttestorName; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; - -public class SyncGetAttestorString { - - public static void main(String[] args) throws Exception { - syncGetAttestorString(); - } - - public static void syncGetAttestorString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); - Attestor response = binauthzManagementServiceV1Beta1Client.getAttestor(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java deleted file mode 100644 index 7d392153..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/AsyncGetPolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; - -public class AsyncGetPolicy { - - public static void main(String[] args) throws Exception { - asyncGetPolicy(); - } - - public static void asyncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - GetPolicyRequest request = - GetPolicyRequest.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.getPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java deleted file mode 100644 index d6090732..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.GetPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - GetPolicyRequest request = - GetPolicyRequest.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .build(); - Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java deleted file mode 100644 index 469346b7..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyPolicyname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_Policyname_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; - -public class SyncGetPolicyPolicyname { - - public static void main(String[] args) throws Exception { - syncGetPolicyPolicyname(); - } - - public static void syncGetPolicyPolicyname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java deleted file mode 100644 index f1544dfc..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/getpolicy/SyncGetPolicyString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_String_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; - -public class SyncGetPolicyString { - - public static void main(String[] args) throws Exception { - syncGetPolicyString(); - } - - public static void syncGetPolicyString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - String name = PolicyName.ofProjectName("[PROJECT]").toString(); - Policy response = binauthzManagementServiceV1Beta1Client.getPolicy(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_GetPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java deleted file mode 100644 index 12d84ed5..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestors.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class AsyncListAttestors { - - public static void main(String[] args) throws Exception { - asyncListAttestors(); - } - - public static void asyncListAttestors() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - ListAttestorsRequest request = - ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.listAttestorsPagedCallable().futureCall(request); - // Do something. - for (Attestor element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java deleted file mode 100644 index d5fd2d1e..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/AsyncListAttestorsPaged.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Paged_async] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsResponse; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; -import com.google.common.base.Strings; - -public class AsyncListAttestorsPaged { - - public static void main(String[] args) throws Exception { - asyncListAttestorsPaged(); - } - - public static void asyncListAttestorsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - ListAttestorsRequest request = - ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - ListAttestorsResponse response = - binauthzManagementServiceV1Beta1Client.listAttestorsCallable().call(request); - for (Attestor element : response.getAttestorsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Paged_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java deleted file mode 100644 index d7342eb0..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestors.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ListAttestorsRequest; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncListAttestors { - - public static void main(String[] args) throws Exception { - syncListAttestors(); - } - - public static void syncListAttestors() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - ListAttestorsRequest request = - ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Attestor element : - binauthzManagementServiceV1Beta1Client.listAttestors(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java deleted file mode 100644 index ee0e8357..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsProjectname.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Projectname_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncListAttestorsProjectname { - - public static void main(String[] args) throws Exception { - syncListAttestorsProjectname(); - } - - public static void syncListAttestorsProjectname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - for (Attestor element : - binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_Projectname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java deleted file mode 100644 index 25881d27..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/listattestors/SyncListAttestorsString.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_String_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.ProjectName; - -public class SyncListAttestorsString { - - public static void main(String[] args) throws Exception { - syncListAttestorsString(); - } - - public static void syncListAttestorsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - for (Attestor element : - binauthzManagementServiceV1Beta1Client.listAttestors(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_ListAttestors_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java deleted file mode 100644 index 844fd445..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/AsyncUpdateAttestor.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; - -public class AsyncUpdateAttestor { - - public static void main(String[] args) throws Exception { - asyncUpdateAttestor(); - } - - public static void asyncUpdateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - UpdateAttestorRequest request = - UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.updateAttestorCallable().futureCall(request); - // Do something. - Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java deleted file mode 100644 index bede9814..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestor.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.UpdateAttestorRequest; - -public class SyncUpdateAttestor { - - public static void main(String[] args) throws Exception { - syncUpdateAttestor(); - } - - public static void syncUpdateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - UpdateAttestorRequest request = - UpdateAttestorRequest.newBuilder().setAttestor(Attestor.newBuilder().build()).build(); - Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java deleted file mode 100644 index 0be6fb65..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updateattestor/SyncUpdateAttestorAttestor.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_Attestor_sync] -import com.google.cloud.binaryauthorization.v1beta1.Attestor; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; - -public class SyncUpdateAttestorAttestor { - - public static void main(String[] args) throws Exception { - syncUpdateAttestorAttestor(); - } - - public static void syncUpdateAttestorAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - Attestor attestor = Attestor.newBuilder().build(); - Attestor response = binauthzManagementServiceV1Beta1Client.updateAttestor(attestor); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdateAttestor_Attestor_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java deleted file mode 100644 index 4256c2d5..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/AsyncUpdatePolicy.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; - -public class AsyncUpdatePolicy { - - public static void main(String[] args) throws Exception { - asyncUpdatePolicy(); - } - - public static void asyncUpdatePolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - UpdatePolicyRequest request = - UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); - ApiFuture future = - binauthzManagementServiceV1Beta1Client.updatePolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java deleted file mode 100644 index bae84c8f..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicy.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.UpdatePolicyRequest; - -public class SyncUpdatePolicy { - - public static void main(String[] args) throws Exception { - syncUpdatePolicy(); - } - - public static void syncUpdatePolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - UpdatePolicyRequest request = - UpdatePolicyRequest.newBuilder().setPolicy(Policy.newBuilder().build()).build(); - Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java deleted file mode 100644 index 05b8ed92..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1/updatepolicy/SyncUpdatePolicyPolicy.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_Policy_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.Policy; - -public class SyncUpdatePolicyPolicy { - - public static void main(String[] args) throws Exception { - syncUpdatePolicyPolicy(); - } - - public static void syncUpdatePolicyPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Beta1Client binauthzManagementServiceV1Beta1Client = - BinauthzManagementServiceV1Beta1Client.create()) { - Policy policy = Policy.newBuilder().build(); - Policy response = binauthzManagementServiceV1Beta1Client.updatePolicy(policy); - } - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1_UpdatePolicy_Policy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java deleted file mode 100644 index af9e6ed0..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/binauthzmanagementservicev1beta1settings/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1Settings_GetPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.BinauthzManagementServiceV1Beta1Settings; -import java.time.Duration; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Beta1Settings.Builder - binauthzManagementServiceV1Beta1SettingsBuilder = - BinauthzManagementServiceV1Beta1Settings.newBuilder(); - binauthzManagementServiceV1Beta1SettingsBuilder - .getPolicySettings() - .setRetrySettings( - binauthzManagementServiceV1Beta1SettingsBuilder - .getPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - BinauthzManagementServiceV1Beta1Settings binauthzManagementServiceV1Beta1Settings = - binauthzManagementServiceV1Beta1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1Settings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java deleted file mode 100644 index cfc5f0a6..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/binauthzmanagementservicev1beta1stubsettings/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub.samples; - -// [START binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1StubSettings_GetPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.stub.BinauthzManagementServiceV1Beta1StubSettings; -import java.time.Duration; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Beta1StubSettings.Builder - binauthzManagementServiceV1Beta1SettingsBuilder = - BinauthzManagementServiceV1Beta1StubSettings.newBuilder(); - binauthzManagementServiceV1Beta1SettingsBuilder - .getPolicySettings() - .setRetrySettings( - binauthzManagementServiceV1Beta1SettingsBuilder - .getPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - BinauthzManagementServiceV1Beta1StubSettings binauthzManagementServiceV1Beta1Settings = - binauthzManagementServiceV1Beta1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1beta1_generated_BinauthzManagementServiceV1Beta1StubSettings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index a0df404e..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/stub/systempolicyv1beta1stubsettings/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.stub.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1StubSettings_GetSystemPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.stub.SystemPolicyV1Beta1StubSettings; -import java.time.Duration; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Beta1StubSettings.Builder systemPolicyV1Beta1SettingsBuilder = - SystemPolicyV1Beta1StubSettings.newBuilder(); - systemPolicyV1Beta1SettingsBuilder - .getSystemPolicySettings() - .setRetrySettings( - systemPolicyV1Beta1SettingsBuilder - .getSystemPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - SystemPolicyV1Beta1StubSettings systemPolicyV1Beta1Settings = - systemPolicyV1Beta1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1StubSettings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 6ddb2102..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; -import com.google.cloud.binaryauthorization.v1beta1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - SystemPolicyV1Beta1Settings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = - SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 711d0c90..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider1_sync] -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - SystemPolicyV1Beta1Settings.newHttpJsonBuilder().build(); - SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = - SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 68f69659..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetEndpoint_sync] -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; -import com.google.cloud.binaryauthorization.v1beta1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - SystemPolicyV1Beta1Settings.newBuilder().setEndpoint(myEndpoint).build(); - SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = - SystemPolicyV1Beta1Client.create(systemPolicyV1Beta1Settings); - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java deleted file mode 100644 index 856bc75f..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/AsyncGetSystemPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_async] -import com.google.api.core.ApiFuture; -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; - -public class AsyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - asyncGetSystemPolicy(); - } - - public static void asyncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - GetSystemPolicyRequest request = - GetSystemPolicyRequest.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .build(); - ApiFuture future = - systemPolicyV1Beta1Client.getSystemPolicyCallable().futureCall(request); - // Do something. - Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_async] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index 2b02b333..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.GetSystemPolicyRequest; -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - GetSystemPolicyRequest request = - GetSystemPolicyRequest.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .build(); - Policy response = systemPolicyV1Beta1Client.getSystemPolicy(request); - } - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java deleted file mode 100644 index 15ae732f..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyPolicyname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_Policyname_sync] -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; - -public class SyncGetSystemPolicyPolicyname { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicyPolicyname(); - } - - public static void syncGetSystemPolicyPolicyname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java deleted file mode 100644 index 58a26eda..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1/getsystempolicy/SyncGetSystemPolicyString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_String_sync] -import com.google.cloud.binaryauthorization.v1beta1.Policy; -import com.google.cloud.binaryauthorization.v1beta1.PolicyName; -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Client; - -public class SyncGetSystemPolicyString { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicyString(); - } - - public static void syncGetSystemPolicyString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Beta1Client systemPolicyV1Beta1Client = SystemPolicyV1Beta1Client.create()) { - String name = PolicyName.ofProjectName("[PROJECT]").toString(); - Policy response = systemPolicyV1Beta1Client.getSystemPolicy(name); - } - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1_GetSystemPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index b58d5fc3..00000000 --- a/samples/snippets/generated/com/google/cloud/binaryauthorization/v1beta1/systempolicyv1beta1settings/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.binaryauthorization.v1beta1.samples; - -// [START binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1Settings_GetSystemPolicy_sync] -import com.google.cloud.binaryauthorization.v1beta1.SystemPolicyV1Beta1Settings; -import java.time.Duration; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Beta1Settings.Builder systemPolicyV1Beta1SettingsBuilder = - SystemPolicyV1Beta1Settings.newBuilder(); - systemPolicyV1Beta1SettingsBuilder - .getSystemPolicySettings() - .setRetrySettings( - systemPolicyV1Beta1SettingsBuilder - .getSystemPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - SystemPolicyV1Beta1Settings systemPolicyV1Beta1Settings = - systemPolicyV1Beta1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1beta1_generated_SystemPolicyV1Beta1Settings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index f08b8239..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - BinauthzManagementServiceV1Settings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index 06e4d867..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider1_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - BinauthzManagementServiceV1Settings.newHttpJsonBuilder().build(); - BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java deleted file mode 100644 index aebe3f68..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetEndpoint_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - BinauthzManagementServiceV1Settings.newBuilder().setEndpoint(myEndpoint).build(); - BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create(binauthzManagementServiceV1Settings); - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java deleted file mode 100644 index 50bc5df9..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/AsyncCreateAttestor.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncCreateAttestor { - - public static void main(String[] args) throws Exception { - asyncCreateAttestor(); - } - - public static void asyncCreateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.CreateAttestorRequest request = - Service.CreateAttestorRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setAttestorId("attestorId2055733027") - .setAttestor(Resources.Attestor.newBuilder().build()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.createAttestorCallable().futureCall(request); - // Do something. - Resources.Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java deleted file mode 100644 index 7a9efc65..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestor.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncCreateAttestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestor(); - } - - public static void syncCreateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.CreateAttestorRequest request = - Service.CreateAttestorRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setAttestorId("attestorId2055733027") - .setAttestor(Resources.Attestor.newBuilder().build()) - .build(); - Resources.Attestor response = binauthzManagementServiceV1Client.createAttestor(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java deleted file mode 100644 index 7d2ec679..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorProjectnameStringResourcesattestor.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_ProjectnameStringResourcesattestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncCreateAttestorProjectnameStringResourcesattestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestorProjectnameStringResourcesattestor(); - } - - public static void syncCreateAttestorProjectnameStringResourcesattestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - Resources.Attestor response = - binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_ProjectnameStringResourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java deleted file mode 100644 index 4a2bf443..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/createattestor/SyncCreateAttestorStringStringResourcesattestor.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_StringStringResourcesattestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncCreateAttestorStringStringResourcesattestor { - - public static void main(String[] args) throws Exception { - syncCreateAttestorStringStringResourcesattestor(); - } - - public static void syncCreateAttestorStringStringResourcesattestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - String attestorId = "attestorId2055733027"; - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - Resources.Attestor response = - binauthzManagementServiceV1Client.createAttestor(parent, attestorId, attestor); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_CreateAttestor_StringStringResourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java deleted file mode 100644 index 11eaffca..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/AsyncDeleteAttestor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncDeleteAttestor { - - public static void main(String[] args) throws Exception { - asyncDeleteAttestor(); - } - - public static void asyncDeleteAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.DeleteAttestorRequest request = - Service.DeleteAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.deleteAttestorCallable().futureCall(request); - // Do something. - future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java deleted file mode 100644 index 4bd2c700..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncDeleteAttestor { - - public static void main(String[] args) throws Exception { - syncDeleteAttestor(); - } - - public static void syncDeleteAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.DeleteAttestorRequest request = - Service.DeleteAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - binauthzManagementServiceV1Client.deleteAttestor(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java deleted file mode 100644 index acd49996..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorAttestorname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_Attestorname_sync] -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; - -public class SyncDeleteAttestorAttestorname { - - public static void main(String[] args) throws Exception { - syncDeleteAttestorAttestorname(); - } - - public static void syncDeleteAttestorAttestorname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - binauthzManagementServiceV1Client.deleteAttestor(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java deleted file mode 100644 index 07de40a5..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/deleteattestor/SyncDeleteAttestorString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_String_sync] -import com.google.protobuf.Empty; -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; - -public class SyncDeleteAttestorString { - - public static void main(String[] args) throws Exception { - syncDeleteAttestorString(); - } - - public static void syncDeleteAttestorString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); - binauthzManagementServiceV1Client.deleteAttestor(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_DeleteAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java deleted file mode 100644 index bb9844d0..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/AsyncGetAttestor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncGetAttestor { - - public static void main(String[] args) throws Exception { - asyncGetAttestor(); - } - - public static void asyncGetAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.GetAttestorRequest request = - Service.GetAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.getAttestorCallable().futureCall(request); - // Do something. - Resources.Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java deleted file mode 100644 index 24f19e8b..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncGetAttestor { - - public static void main(String[] args) throws Exception { - syncGetAttestor(); - } - - public static void syncGetAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.GetAttestorRequest request = - Service.GetAttestorRequest.newBuilder() - .setName(AttestorName.of("[PROJECT]", "[ATTESTOR]").toString()) - .build(); - Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java deleted file mode 100644 index 65f46ba2..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorAttestorname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_Attestorname_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncGetAttestorAttestorname { - - public static void main(String[] args) throws Exception { - syncGetAttestorAttestorname(); - } - - public static void syncGetAttestorAttestorname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - AttestorName name = AttestorName.of("[PROJECT]", "[ATTESTOR]"); - Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_Attestorname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java deleted file mode 100644 index 8ae022d8..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getattestor/SyncGetAttestorString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_String_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.AttestorName; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncGetAttestorString { - - public static void main(String[] args) throws Exception { - syncGetAttestorString(); - } - - public static void syncGetAttestorString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - String name = AttestorName.of("[PROJECT]", "[ATTESTOR]").toString(); - Resources.Attestor response = binauthzManagementServiceV1Client.getAttestor(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetAttestor_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java deleted file mode 100644 index 44d0a329..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/AsyncGetPolicy.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncGetPolicy { - - public static void main(String[] args) throws Exception { - asyncGetPolicy(); - } - - public static void asyncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.GetPolicyRequest request = - Service.GetPolicyRequest.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.getPolicyCallable().futureCall(request); - // Do something. - Resources.Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java deleted file mode 100644 index 036fde5c..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.GetPolicyRequest request = - Service.GetPolicyRequest.newBuilder() - .setName(PolicyName.ofProjectName("[PROJECT]").toString()) - .build(); - Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java deleted file mode 100644 index e4ee10e4..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyPolicyname.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_Policyname_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncGetPolicyPolicyname { - - public static void main(String[] args) throws Exception { - syncGetPolicyPolicyname(); - } - - public static void syncGetPolicyPolicyname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - PolicyName name = PolicyName.ofProjectName("[PROJECT]"); - Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java deleted file mode 100644 index 357e926f..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/getpolicy/SyncGetPolicyString.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_String_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncGetPolicyString { - - public static void main(String[] args) throws Exception { - syncGetPolicyString(); - } - - public static void syncGetPolicyString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - String name = PolicyName.ofProjectName("[PROJECT]").toString(); - Resources.Policy response = binauthzManagementServiceV1Client.getPolicy(name); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_GetPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java deleted file mode 100644 index fa974543..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestors.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncListAttestors { - - public static void main(String[] args) throws Exception { - asyncListAttestors(); - } - - public static void asyncListAttestors() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.ListAttestorsRequest request = - Service.ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.listAttestorsPagedCallable().futureCall(request); - // Do something. - for (Resources.Attestor element : future.get().iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java deleted file mode 100644 index 301ae780..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/AsyncListAttestorsPaged.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Paged_async] -import com.google.common.base.Strings; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncListAttestorsPaged { - - public static void main(String[] args) throws Exception { - asyncListAttestorsPaged(); - } - - public static void asyncListAttestorsPaged() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.ListAttestorsRequest request = - Service.ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - while (true) { - Service.ListAttestorsResponse response = - binauthzManagementServiceV1Client.listAttestorsCallable().call(request); - for (Resources.Attestor element : response.getAttestorsList()) { - // doThingsWith(element); - } - String nextPageToken = response.getNextPageToken(); - if (!Strings.isNullOrEmpty(nextPageToken)) { - request = request.toBuilder().setPageToken(nextPageToken).build(); - } else { - break; - } - } - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Paged_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java deleted file mode 100644 index 93f38556..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestors.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncListAttestors { - - public static void main(String[] args) throws Exception { - syncListAttestors(); - } - - public static void syncListAttestors() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.ListAttestorsRequest request = - Service.ListAttestorsRequest.newBuilder() - .setParent(ProjectName.of("[PROJECT]").toString()) - .setPageSize(883849137) - .setPageToken("pageToken873572522") - .build(); - for (Resources.Attestor element : - binauthzManagementServiceV1Client.listAttestors(request).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java deleted file mode 100644 index 97c68a56..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsProjectname.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Projectname_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncListAttestorsProjectname { - - public static void main(String[] args) throws Exception { - syncListAttestorsProjectname(); - } - - public static void syncListAttestorsProjectname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - ProjectName parent = ProjectName.of("[PROJECT]"); - for (Resources.Attestor element : - binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_Projectname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java deleted file mode 100644 index 7d55fcae..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/listattestors/SyncListAttestorsString.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_String_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ProjectName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncListAttestorsString { - - public static void main(String[] args) throws Exception { - syncListAttestorsString(); - } - - public static void syncListAttestorsString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - String parent = ProjectName.of("[PROJECT]").toString(); - for (Resources.Attestor element : - binauthzManagementServiceV1Client.listAttestors(parent).iterateAll()) { - // doThingsWith(element); - } - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_ListAttestors_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java deleted file mode 100644 index eaeb9110..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/AsyncUpdateAttestor.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncUpdateAttestor { - - public static void main(String[] args) throws Exception { - asyncUpdateAttestor(); - } - - public static void asyncUpdateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.UpdateAttestorRequest request = - Service.UpdateAttestorRequest.newBuilder() - .setAttestor(Resources.Attestor.newBuilder().build()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.updateAttestorCallable().futureCall(request); - // Do something. - Resources.Attestor response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java deleted file mode 100644 index 513a3f3e..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestor.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncUpdateAttestor { - - public static void main(String[] args) throws Exception { - syncUpdateAttestor(); - } - - public static void syncUpdateAttestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.UpdateAttestorRequest request = - Service.UpdateAttestorRequest.newBuilder() - .setAttestor(Resources.Attestor.newBuilder().build()) - .build(); - Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java deleted file mode 100644 index 328ae2dc..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updateattestor/SyncUpdateAttestorResourcesattestor.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_Resourcesattestor_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncUpdateAttestorResourcesattestor { - - public static void main(String[] args) throws Exception { - syncUpdateAttestorResourcesattestor(); - } - - public static void syncUpdateAttestorResourcesattestor() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Resources.Attestor attestor = Resources.Attestor.newBuilder().build(); - Resources.Attestor response = binauthzManagementServiceV1Client.updateAttestor(attestor); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdateAttestor_Resourcesattestor_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java deleted file mode 100644 index 02d0f720..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/AsyncUpdatePolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class AsyncUpdatePolicy { - - public static void main(String[] args) throws Exception { - asyncUpdatePolicy(); - } - - public static void asyncUpdatePolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.UpdatePolicyRequest request = - Service.UpdatePolicyRequest.newBuilder() - .setPolicy(Resources.Policy.newBuilder().build()) - .build(); - ApiFuture future = - binauthzManagementServiceV1Client.updatePolicyCallable().futureCall(request); - // Do something. - Resources.Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java deleted file mode 100644 index 98d854b0..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; - -public class SyncUpdatePolicy { - - public static void main(String[] args) throws Exception { - syncUpdatePolicy(); - } - - public static void syncUpdatePolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Service.UpdatePolicyRequest request = - Service.UpdatePolicyRequest.newBuilder() - .setPolicy(Resources.Policy.newBuilder().build()) - .build(); - Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(request); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java deleted file mode 100644 index 5023977c..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1/updatepolicy/SyncUpdatePolicyResourcespolicy.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_Resourcespolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; - -public class SyncUpdatePolicyResourcespolicy { - - public static void main(String[] args) throws Exception { - syncUpdatePolicyResourcespolicy(); - } - - public static void syncUpdatePolicyResourcespolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (BinauthzManagementServiceV1Client binauthzManagementServiceV1Client = - BinauthzManagementServiceV1Client.create()) { - Resources.Policy policy = Resources.Policy.newBuilder().build(); - Resources.Policy response = binauthzManagementServiceV1Client.updatePolicy(policy); - } - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1_UpdatePolicy_Resourcespolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java deleted file mode 100644 index 00e0eb40..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/binauthzmanagementservicev1settings/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1Settings_GetPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.BinauthzManagementServiceV1Settings; -import java.time.Duration; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1Settings.Builder binauthzManagementServiceV1SettingsBuilder = - BinauthzManagementServiceV1Settings.newBuilder(); - binauthzManagementServiceV1SettingsBuilder - .getPolicySettings() - .setRetrySettings( - binauthzManagementServiceV1SettingsBuilder - .getPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - BinauthzManagementServiceV1Settings binauthzManagementServiceV1Settings = - binauthzManagementServiceV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1Settings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java deleted file mode 100644 index 4a67ce5b..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/binauthzmanagementservicev1stubsettings/getpolicy/SyncGetPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; - -// [START binaryauthorization_v1_generated_BinauthzManagementServiceV1StubSettings_GetPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.stub.BinauthzManagementServiceV1StubSettings; -import java.time.Duration; - -public class SyncGetPolicy { - - public static void main(String[] args) throws Exception { - syncGetPolicy(); - } - - public static void syncGetPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - BinauthzManagementServiceV1StubSettings.Builder binauthzManagementServiceV1SettingsBuilder = - BinauthzManagementServiceV1StubSettings.newBuilder(); - binauthzManagementServiceV1SettingsBuilder - .getPolicySettings() - .setRetrySettings( - binauthzManagementServiceV1SettingsBuilder - .getPolicySettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - BinauthzManagementServiceV1StubSettings binauthzManagementServiceV1Settings = - binauthzManagementServiceV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_BinauthzManagementServiceV1StubSettings_GetPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index 241ecdda..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/systempolicyv1stubsettings/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1StubSettings_GetSystemPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.stub.SystemPolicyV1StubSettings; -import java.time.Duration; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1StubSettings.Builder systemPolicyV1SettingsBuilder = - SystemPolicyV1StubSettings.newBuilder(); - systemPolicyV1SettingsBuilder - .getSystemPolicySettings() - .setRetrySettings( - systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - SystemPolicyV1StubSettings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1StubSettings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java deleted file mode 100644 index adfbe2d2..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/stub/validationhelperv1stubsettings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.stub.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1StubSettings_ValidateAttestationOccurrence_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.stub.ValidationHelperV1StubSettings; -import java.time.Duration; - -public class SyncValidateAttestationOccurrence { - - public static void main(String[] args) throws Exception { - syncValidateAttestationOccurrence(); - } - - public static void syncValidateAttestationOccurrence() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ValidationHelperV1StubSettings.Builder validationHelperV1SettingsBuilder = - ValidationHelperV1StubSettings.newBuilder(); - validationHelperV1SettingsBuilder - .validateAttestationOccurrenceSettings() - .setRetrySettings( - validationHelperV1SettingsBuilder - .validateAttestationOccurrenceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ValidationHelperV1StubSettings validationHelperV1Settings = - validationHelperV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1StubSettings_ValidateAttestationOccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index 7ff7d792..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Settings systemPolicyV1Settings = - SystemPolicyV1Settings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index eaac0879..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider1_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Settings systemPolicyV1Settings = - SystemPolicyV1Settings.newHttpJsonBuilder().build(); - SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java deleted file mode 100644 index 16206d60..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_Create_SetEndpoint_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Settings systemPolicyV1Settings = - SystemPolicyV1Settings.newBuilder().setEndpoint(myEndpoint).build(); - SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create(systemPolicyV1Settings); - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java deleted file mode 100644 index d8e2acfd..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/AsyncGetSystemPolicy.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; - -public class AsyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - asyncGetSystemPolicy(); - } - - public static void asyncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - Service.GetSystemPolicyRequest request = - Service.GetSystemPolicyRequest.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .build(); - ApiFuture future = - systemPolicyV1Client.getSystemPolicyCallable().futureCall(request); - // Do something. - Resources.Policy response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index b75ad78b..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - Service.GetSystemPolicyRequest request = - Service.GetSystemPolicyRequest.newBuilder() - .setName(PolicyName.ofLocationName("[LOCATION]").toString()) - .build(); - Resources.Policy response = systemPolicyV1Client.getSystemPolicy(request); - } - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java deleted file mode 100644 index 2ad4e312..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyPolicyname.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_Policyname_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; - -public class SyncGetSystemPolicyPolicyname { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicyPolicyname(); - } - - public static void syncGetSystemPolicyPolicyname() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - PolicyName name = PolicyName.ofLocationName("[LOCATION]"); - Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); - } - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_Policyname_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java deleted file mode 100644 index f48e47c3..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1/getsystempolicy/SyncGetSystemPolicyString.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_String_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.PolicyName; -import com.google.protos.google.cloud.binaryauthorization.v1.Resources; -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Client; - -public class SyncGetSystemPolicyString { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicyString(); - } - - public static void syncGetSystemPolicyString() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (SystemPolicyV1Client systemPolicyV1Client = SystemPolicyV1Client.create()) { - String name = PolicyName.ofProjectName("[PROJECT]").toString(); - Resources.Policy response = systemPolicyV1Client.getSystemPolicy(name); - } - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1_GetSystemPolicy_String_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java deleted file mode 100644 index 0a2e5012..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/systempolicyv1settings/getsystempolicy/SyncGetSystemPolicy.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_SystemPolicyV1Settings_GetSystemPolicy_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.SystemPolicyV1Settings; -import java.time.Duration; - -public class SyncGetSystemPolicy { - - public static void main(String[] args) throws Exception { - syncGetSystemPolicy(); - } - - public static void syncGetSystemPolicy() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - SystemPolicyV1Settings.Builder systemPolicyV1SettingsBuilder = - SystemPolicyV1Settings.newBuilder(); - systemPolicyV1SettingsBuilder - .getSystemPolicySettings() - .setRetrySettings( - systemPolicyV1SettingsBuilder.getSystemPolicySettings().getRetrySettings().toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - SystemPolicyV1Settings systemPolicyV1Settings = systemPolicyV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_SystemPolicyV1Settings_GetSystemPolicy_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java deleted file mode 100644 index d2f05371..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider_sync] -import com.google.api.gax.core.FixedCredentialsProvider; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myCredentials; - -public class SyncCreateSetCredentialsProvider { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider(); - } - - public static void syncCreateSetCredentialsProvider() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ValidationHelperV1Settings validationHelperV1Settings = - ValidationHelperV1Settings.newBuilder() - .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) - .build(); - ValidationHelperV1Client validationHelperV1Client = - ValidationHelperV1Client.create(validationHelperV1Settings); - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java deleted file mode 100644 index a663fa29..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetCredentialsProvider1.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider1_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; - -public class SyncCreateSetCredentialsProvider1 { - - public static void main(String[] args) throws Exception { - syncCreateSetCredentialsProvider1(); - } - - public static void syncCreateSetCredentialsProvider1() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ValidationHelperV1Settings validationHelperV1Settings = - ValidationHelperV1Settings.newHttpJsonBuilder().build(); - ValidationHelperV1Client validationHelperV1Client = - ValidationHelperV1Client.create(validationHelperV1Settings); - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetCredentialsProvider1_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java deleted file mode 100644 index e222b0db..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/create/SyncCreateSetEndpoint.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1_Create_SetEndpoint_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; -import com.google.protos.google.cloud.binaryauthorization.v1.myEndpoint; - -public class SyncCreateSetEndpoint { - - public static void main(String[] args) throws Exception { - syncCreateSetEndpoint(); - } - - public static void syncCreateSetEndpoint() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ValidationHelperV1Settings validationHelperV1Settings = - ValidationHelperV1Settings.newBuilder().setEndpoint(myEndpoint).build(); - ValidationHelperV1Client validationHelperV1Client = - ValidationHelperV1Client.create(validationHelperV1Settings); - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_Create_SetEndpoint_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java deleted file mode 100644 index ddca0ba6..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/AsyncValidateAttestationOccurrence.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_async] -import com.google.api.core.ApiFuture; -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; -import io.grafeas.v1.AttestationOccurrence; - -public class AsyncValidateAttestationOccurrence { - - public static void main(String[] args) throws Exception { - asyncValidateAttestationOccurrence(); - } - - public static void asyncValidateAttestationOccurrence() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) { - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("attestor542920680") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - ApiFuture future = - validationHelperV1Client.validateAttestationOccurrenceCallable().futureCall(request); - // Do something. - Service.ValidateAttestationOccurrenceResponse response = future.get(); - } - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_async] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java deleted file mode 100644 index 75c81f4a..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.Service; -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Client; -import io.grafeas.v1.AttestationOccurrence; - -public class SyncValidateAttestationOccurrence { - - public static void main(String[] args) throws Exception { - syncValidateAttestationOccurrence(); - } - - public static void syncValidateAttestationOccurrence() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - try (ValidationHelperV1Client validationHelperV1Client = ValidationHelperV1Client.create()) { - Service.ValidateAttestationOccurrenceRequest request = - Service.ValidateAttestationOccurrenceRequest.newBuilder() - .setAttestor("attestor542920680") - .setAttestation(AttestationOccurrence.newBuilder().build()) - .setOccurrenceNote("occurrenceNote1722072419") - .setOccurrenceResourceUri("occurrenceResourceUri1001424877") - .build(); - Service.ValidateAttestationOccurrenceResponse response = - validationHelperV1Client.validateAttestationOccurrence(request); - } - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1_ValidateAttestationOccurrence_sync] diff --git a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java b/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java deleted file mode 100644 index 399c3914..00000000 --- a/samples/snippets/generated/com/google/protos/google/cloud/binaryauthorization/v1/validationhelperv1settings/validateattestationoccurrence/SyncValidateAttestationOccurrence.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2022 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT 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.protos.google.cloud.binaryauthorization.v1.samples; - -// [START binaryauthorization_v1_generated_ValidationHelperV1Settings_ValidateAttestationOccurrence_sync] -import com.google.protos.google.cloud.binaryauthorization.v1.ValidationHelperV1Settings; -import java.time.Duration; - -public class SyncValidateAttestationOccurrence { - - public static void main(String[] args) throws Exception { - syncValidateAttestationOccurrence(); - } - - public static void syncValidateAttestationOccurrence() throws Exception { - // This snippet has been automatically generated and should be regarded as a code template only. - // It will require modifications to work: - // - It may require correct/in-range values for request initialization. - // - It may require specifying regional endpoints when creating the service client as shown in - // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library - ValidationHelperV1Settings.Builder validationHelperV1SettingsBuilder = - ValidationHelperV1Settings.newBuilder(); - validationHelperV1SettingsBuilder - .validateAttestationOccurrenceSettings() - .setRetrySettings( - validationHelperV1SettingsBuilder - .validateAttestationOccurrenceSettings() - .getRetrySettings() - .toBuilder() - .setTotalTimeout(Duration.ofSeconds(30)) - .build()); - ValidationHelperV1Settings validationHelperV1Settings = - validationHelperV1SettingsBuilder.build(); - } -} -// [END binaryauthorization_v1_generated_ValidationHelperV1Settings_ValidateAttestationOccurrence_sync] diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml deleted file mode 100644 index d9768700..00000000 --- a/samples/snippets/pom.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - 4.0.0 - com.google.cloud - binary-authorization-snippets - jar - Google Binary Authorization Snippets - https://github.com/googleapis/java-binary-authorization - - - - com.google.cloud.samples - shared-configuration - 1.2.0 - - - - 1.8 - 1.8 - UTF-8 - - - - - - com.google.cloud - google-cloud-binary-authorization - 0.4.1 - - - - junit - junit - 4.13.2 - test - - - com.google.truth - truth - 1.1.3 - test - - - diff --git a/versions.txt b/versions.txt deleted file mode 100644 index 6a25ebd1..00000000 --- a/versions.txt +++ /dev/null @@ -1,8 +0,0 @@ -# Format: -# module:released-version:current-version - -google-cloud-binary-authorization:1.2.8:1.2.9-SNAPSHOT -grpc-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.9-SNAPSHOT -grpc-google-cloud-binary-authorization-v1:1.2.8:1.2.9-SNAPSHOT -proto-google-cloud-binary-authorization-v1beta1:0.7.8:0.7.9-SNAPSHOT -proto-google-cloud-binary-authorization-v1:1.2.8:1.2.9-SNAPSHOT From 8b55c9ab03428d11ef096cf9f5b38bda89cac624 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Thu, 6 Jul 2023 08:53:13 -0400 Subject: [PATCH 203/203] chore: add java-docs-samples in README.md (#347) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index e1864b2f..dccfa613 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ https://github.com/googleapis/google-cloud-java/tree/main/java-binary-authorizat This repository will be archived in the future. Future releases will appear in the new repository (https://github.com/googleapis/google-cloud-java/releases). The Maven artifact coordinates (`com.google.cloud:google-cloud-binary-authorization`) remain the same. +Sample code is in https://github.com/GoogleCloudPlatform/java-docs-samples. ## Quickstart